Allow suicide pin inverting (#15586)

2.0.x
InsanityAutomation 5 years ago committed by Scott Lahteine
parent 2a7e1d459f
commit 82fb046013

@ -217,7 +217,7 @@ void setup_killpin() {
void setup_powerhold() { void setup_powerhold() {
#if HAS_SUICIDE #if HAS_SUICIDE
OUT_WRITE(SUICIDE_PIN, HIGH); OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
#endif #endif
#if ENABLED(PSU_CONTROL) #if ENABLED(PSU_CONTROL)
#if ENABLED(PS_DEFAULT_OFF) #if ENABLED(PS_DEFAULT_OFF)

@ -368,7 +368,7 @@ bool pin_is_protected(const pin_t pin);
void protected_pin_err(); void protected_pin_err();
#if HAS_SUICIDE #if HAS_SUICIDE
inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); } inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_INVERTING); }
#endif #endif
#if ENABLED(G29_RETRY_AND_RECOVER) #if ENABLED(G29_RETRY_AND_RECOVER)

@ -68,7 +68,7 @@
* a print without suicide... * a print without suicide...
*/ */
#if HAS_SUICIDE #if HAS_SUICIDE
OUT_WRITE(SUICIDE_PIN, HIGH); OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
#endif #endif
#if DISABLED(AUTO_POWER_CONTROL) #if DISABLED(AUTO_POWER_CONTROL)

@ -801,6 +801,9 @@
#ifndef SUICIDE_PIN #ifndef SUICIDE_PIN
#define SUICIDE_PIN -1 #define SUICIDE_PIN -1
#endif #endif
#ifndef SUICIDE_PIN_INVERTING
#define SUICIDE_PIN_INVERTING false
#endif
#ifndef NUM_SERVO_PLUGS #ifndef NUM_SERVO_PLUGS
#define NUM_SERVO_PLUGS 4 #define NUM_SERVO_PLUGS 4

@ -36,15 +36,27 @@
#define FIL_RUNOUT_PIN 2 #define FIL_RUNOUT_PIN 2
#if NUM_RUNOUT_SENSORS > 1 #if NUM_RUNOUT_SENSORS > 1
#define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors #define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors
#endif #endif
#define SD_DETECT_PIN 49 // Always define onboard SD detect #define SD_DETECT_PIN 49 // Always define onboard SD detect
#define BEEPER_PIN 37 // Always define beeper pin so Play Tone works with ExtUI
#define PS_ON_PIN 40 // Used by CR2020 Industrial series
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN)
#define CASE_LIGHT_PIN 65
#endif
#include "pins_RAMPS.h" #include "pins_RAMPS.h"
#define EXP1_PIN 65 // A11 #ifndef BEEPER_PIN
#define EXP2_PIN 66 // A12 #define BEEPER_PIN 37 // Always define beeper pin so Play Tone works with ExtUI
#define EXP3_PIN 11 // SERVO0_PIN #endif
#define EXP4_PIN 12 // PS_ON_PIN
#define EXP1_PIN 65 // A11 - Used by CR2020 Industrial series for case
#define EXP2_PIN 66 // A12
#define EXP3_PIN 11 // SERVO0_PIN
#define EXP4_PIN 12 // PS_ON_PIN
#define SUICIDE_PIN 12 // Used by CR2020 Industrial series
#define SUICIDE_PIN_INVERTING true // Used by CR2020 Industrial series

Loading…
Cancel
Save