From 0fdb3f0abfcbe0f2c089bbc4ed9aad5a9f8b31a6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 25 Mar 2022 19:00:42 -0500 Subject: [PATCH] Init FREEZE based on active state --- Marlin/Configuration_adv.h | 2 +- Marlin/src/MarlinCore.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 73c76f164cee9..25ee5d896630d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -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 /** diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index a3f4e753bf2e1..b1684d8928ef9 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1168,7 +1168,11 @@ void setup() { #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