Add POWER_OFF_DELAY option (#19987)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Hebezo
2020-11-09 01:37:41 +01:00
committed by GitHub
parent c753d2b7f4
commit 4ace02f4c2
7 changed files with 29 additions and 12 deletions

View File

@ -416,8 +416,13 @@
#endif
#endif
#if !defined(PSU_POWERUP_DELAY) && ENABLED(PSU_CONTROL)
#define PSU_POWERUP_DELAY 250
#if ENABLED(PSU_CONTROL)
#ifndef PSU_POWERUP_DELAY
#define PSU_POWERUP_DELAY 250
#endif
#ifndef POWER_OFF_DELAY
#define POWER_OFF_DELAY 0
#endif
#endif
/**

View File

@ -3016,9 +3016,9 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#error "PSU_CONTROL requires PSU_ACTIVE_STATE to be defined as 'HIGH' or 'LOW'."
#elif !PIN_EXISTS(PS_ON)
#error "PSU_CONTROL requires PS_ON_PIN."
#elif POWER_OFF_DELAY < 0
#error "POWER_OFF_DELAY must be a positive value."
#endif
#elif ENABLED(AUTO_POWER_CONTROL)
#error "AUTO_POWER_CONTROL requires PSU_CONTROL."
#endif
#if HAS_CUTTER