InsanityAutomation 5 лет назад
Родитель
Сommit
82fb046013

+ 1
- 1
Marlin/src/Marlin.cpp Просмотреть файл

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

+ 1
- 1
Marlin/src/Marlin.h Просмотреть файл

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

+ 1
- 1
Marlin/src/gcode/control/M80_M81.cpp Просмотреть файл

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

+ 3
- 0
Marlin/src/pins/pins.h Просмотреть файл

@@ -801,6 +801,9 @@
801 801
 #ifndef SUICIDE_PIN
802 802
   #define SUICIDE_PIN -1
803 803
 #endif
804
+#ifndef SUICIDE_PIN_INVERTING
805
+  #define SUICIDE_PIN_INVERTING false
806
+#endif
804 807
 
805 808
 #ifndef NUM_SERVO_PLUGS
806 809
   #define NUM_SERVO_PLUGS 4

+ 19
- 7
Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h Просмотреть файл

@@ -36,15 +36,27 @@
36 36
 
37 37
 #define FIL_RUNOUT_PIN 2
38 38
 #if NUM_RUNOUT_SENSORS > 1
39
-  #define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors
39
+  #define FIL_RUNOUT2_PIN  15 // Creality CR-X can use dual runout sensors
40 40
 #endif
41 41
 
42
-#define SD_DETECT_PIN 49  // Always define onboard SD detect
43
-#define BEEPER_PIN    37  // Always define beeper pin so Play Tone works with ExtUI
42
+#define SD_DETECT_PIN      49  // Always define onboard SD detect
43
+
44
+#define PS_ON_PIN          40 // Used by CR2020 Industrial series
45
+
46
+#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN)
47
+  #define CASE_LIGHT_PIN   65
48
+#endif
44 49
 
45 50
 #include "pins_RAMPS.h"
46 51
 
47
-#define EXP1_PIN 65   // A11
48
-#define EXP2_PIN 66   // A12
49
-#define EXP3_PIN 11   // SERVO0_PIN
50
-#define EXP4_PIN 12   // PS_ON_PIN
52
+#ifndef BEEPER_PIN
53
+  #define BEEPER_PIN       37  // Always define beeper pin so Play Tone works with ExtUI
54
+#endif
55
+
56
+#define EXP1_PIN           65   // A11 - Used by CR2020 Industrial series for case
57
+#define EXP2_PIN           66   // A12
58
+#define EXP3_PIN           11   // SERVO0_PIN
59
+#define EXP4_PIN           12   // PS_ON_PIN
60
+
61
+#define SUICIDE_PIN        12 // Used by CR2020 Industrial series
62
+#define SUICIDE_PIN_INVERTING true // Used by CR2020 Industrial series

Загрузка…
Отмена
Сохранить