Skip to content

Commit

Permalink
Init FREEZE based on active state
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 26, 2022
1 parent e2dfa16 commit 90a9130
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -4113,7 +4113,7 @@
//#define FREEZE_FEATURE
#if ENABLED(FREEZE_FEATURE)
//#define FREEZE_PIN 41 // Override the default (KILL) pin here
//#define FREEZE_STATE LOW // State of pin indicating freeze
#define FREEZE_STATE LOW // State of pin indicating freeze
#endif

/**
Expand Down
8 changes: 2 additions & 6 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,16 +1157,12 @@ void setup() {
// Set up these pins early to prevent suicide
#if HAS_KILL
SETUP_LOG("KILL_PIN");
#if KILL_PIN_STATE
SET_INPUT_PULLDOWN(KILL_PIN);
#else
SET_INPUT_PULLUP(KILL_PIN);
#endif
TERN(KILL_PIN_STATE, SET_INPUT_PULLDOWN, SET_INPUT_PULLUP)(KILL_PIN);
#endif

#if ENABLED(FREEZE_FEATURE)
SETUP_LOG("FREEZE_PIN");
SET_INPUT_PULLUP(FREEZE_PIN);
TERN(FREEZE_STATE, SET_INPUT_PULLDOWN, SET_INPUT_PULLUP)(FREEZE_PIN);
#endif

#if HAS_SUICIDE
Expand Down

0 comments on commit 90a9130

Please sign in to comment.