Instant Freeze/Resume Function (#17462)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Jamie
2021-05-14 00:14:13 -05:00
committed by Scott Lahteine
parent 5298fa357c
commit 9e373617dc
8 changed files with 51 additions and 5 deletions

View File

@ -2318,12 +2318,22 @@
#endif
// User Interface
#if ENABLED(FREEZE_FEATURE)
#if !PIN_EXISTS(FREEZE) && PIN_EXISTS(KILL)
#define FREEZE_PIN KILL_PIN
#endif
#if PIN_EXISTS(FREEZE)
#define HAS_FREEZE_PIN 1
#endif
#else
#undef FREEZE_PIN
#endif
#if PIN_EXISTS(KILL) && TERN1(FREEZE_FEATURE, KILL_PIN != FREEZE_PIN)
#define HAS_KILL 1
#endif
#if PIN_EXISTS(HOME)
#define HAS_HOME 1
#endif
#if PIN_EXISTS(KILL)
#define HAS_KILL 1
#endif
#if PIN_EXISTS(SUICIDE)
#define HAS_SUICIDE 1
#endif

View File

@ -3307,3 +3307,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
// Misc. Cleanup
#undef _TEST_PWM
#if ENABLED(FREEZE_FEATURE) && !PIN_EXISTS(FREEZE)
#error "FREEZE_FEATURE requires a FREEZE_PIN to be defined."
#endif