Configurable FREEZE pin state (#23944)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
ellensp
2022-03-26 16:44:22 +13:00
committed by GitHub
parent b1958a43fc
commit 20b5615305
7 changed files with 17 additions and 20 deletions

View File

@@ -476,7 +476,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
#endif
#if HAS_FREEZE_PIN
Stepper::frozen = !READ(FREEZE_PIN);
Stepper::frozen = READ(FREEZE_PIN) ^ DISABLED(INVERT_FREEZE_PIN);
#endif
#if HAS_HOME
@@ -1166,9 +1166,13 @@ void setup() {
#endif
#endif
#if HAS_FREEZE_PIN
#if ENABLED(FREEZE_FEATURE)
SETUP_LOG("FREEZE_PIN");
SET_INPUT_PULLUP(FREEZE_PIN);
#if FREEZE_STATE
SET_INPUT_PULLDOWN(FREEZE_PIN);
#else
SET_INPUT_PULLUP(FREEZE_PIN);
#endif
#endif
#if HAS_SUICIDE