瀏覽代碼

🐛 Fix pulldown sanity check

Scott Lahteine 2 年之前
父節點
當前提交
b1958a43fc

+ 4
- 0
Marlin/src/HAL/AVR/inc/SanityCheck.h 查看文件

@@ -71,3 +71,7 @@
71 71
 #if ENABLED(POSTMORTEM_DEBUGGING)
72 72
   #error "POSTMORTEM_DEBUGGING is not supported on AVR boards."
73 73
 #endif
74
+
75
+#if USING_PULLDOWNS
76
+  #error "PULLDOWN pin mode is not available on AVR boards."
77
+#endif

+ 4
- 0
Marlin/src/HAL/DUE/inc/SanityCheck.h 查看文件

@@ -59,3 +59,7 @@
59 59
 #if HAS_TMC_SW_SERIAL
60 60
   #error "TMC220x Software Serial is not supported on the DUE platform."
61 61
 #endif
62
+
63
+#if USING_PULLDOWNS
64
+  #error "PULLDOWN pin mode is not available on DUE boards."
65
+#endif

+ 4
- 0
Marlin/src/HAL/ESP32/inc/SanityCheck.h 查看文件

@@ -44,3 +44,7 @@
44 44
 #if MB(MKS_TINYBEE) && ENABLED(FAST_PWM_FAN)
45 45
   #error "FAST_PWM_FAN is not available on TinyBee."
46 46
 #endif
47
+
48
+#if USING_PULLDOWNS
49
+  #error "PULLDOWN pin mode is not available on ESP32 boards."
50
+#endif

+ 4
- 0
Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h 查看文件

@@ -40,3 +40,7 @@
40 40
 #if ENABLED(POSTMORTEM_DEBUGGING)
41 41
   #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2."
42 42
 #endif
43
+
44
+#if USING_PULLDOWNS
45
+  #error "PULLDOWN pin mode is not available on Teensy 3.1/3.2 boards."
46
+#endif

+ 4
- 0
Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h 查看文件

@@ -40,3 +40,7 @@
40 40
 #if ENABLED(POSTMORTEM_DEBUGGING)
41 41
   #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6."
42 42
 #endif
43
+
44
+#if USING_PULLDOWNS
45
+  #error "PULLDOWN pin mode is not available on Teensy 3.5/3.6 boards."
46
+#endif

+ 11
- 0
Marlin/src/inc/Conditionals_post.h 查看文件

@@ -3507,3 +3507,14 @@
3507 3507
 #if PIN_EXISTS(SAFE_POWER) && DISABLED(DISABLE_DRIVER_SAFE_POWER_PROTECT)
3508 3508
   #define HAS_DRIVER_SAFE_POWER_PROTECT 1
3509 3509
 #endif
3510
+
3511
+#if ANY(ENDSTOPPULLDOWNS, ENDSTOPPULLDOWN_ZMIN_PROBE, \
3512
+    ENDSTOPPULLDOWN_XMIN, ENDSTOPPULLDOWN_YMIN, ENDSTOPPULLDOWN_ZMIN, \
3513
+    ENDSTOPPULLDOWN_IMIN, ENDSTOPPULLDOWN_JMIN, ENDSTOPPULLDOWN_KMIN, \
3514
+    ENDSTOPPULLDOWN_XMAX, ENDSTOPPULLDOWN_YMAX, ENDSTOPPULLDOWN_ZMAX, \
3515
+    ENDSTOPPULLDOWN_IMAX, ENDSTOPPULLDOWN_JMAX, ENDSTOPPULLDOWN_KMAX, \
3516
+    POWER_LOSS_PULLDOWN, CALIBRATION_PIN_PULLDOWN, FIL_RUNOUT_PULLDOWN, \
3517
+    FIL_RUNOUT1_PULLDOWN, FIL_RUNOUT2_PULLDOWN, FIL_RUNOUT3_PULLDOWN, FIL_RUNOUT4_PULLDOWN, \
3518
+    FIL_RUNOUT5_PULLDOWN, FIL_RUNOUT6_PULLDOWN, FIL_RUNOUT7_PULLDOWN, FIL_RUNOUT8_PULLDOWN)
3519
+  #define USING_PULLDOWNS 1
3520
+#endif

+ 0
- 12
Marlin/src/inc/SanityCheck.h 查看文件

@@ -782,18 +782,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
782 782
   #endif
783 783
 #endif
784 784
 
785
-#if !defined(TARGET_LPC1768) && ANY( \
786
-      ENDSTOPPULLDOWNS, ENDSTOPPULLDOWN_ZMIN_PROBE, \
787
-      ENDSTOPPULLDOWN_XMAX, ENDSTOPPULLDOWN_YMAX, ENDSTOPPULLDOWN_ZMAX, \
788
-      ENDSTOPPULLDOWN_XMIN, ENDSTOPPULLDOWN_YMIN, ENDSTOPPULLDOWN_ZMIN, \
789
-      FIL_RUNOUT_PULLDOWN,  \
790
-      FIL_RUNOUT1_PULLDOWN, FIL_RUNOUT2_PULLDOWN, FIL_RUNOUT3_PULLDOWN, FIL_RUNOUT4_PULLDOWN, \
791
-      FIL_RUNOUT5_PULLDOWN, FIL_RUNOUT6_PULLDOWN, FIL_RUNOUT7_PULLDOWN, FIL_RUNOUT8_PULLDOWN, \
792
-      POWER_LOSS_PULLDOWN, CALIBRATION_PIN_PULLDOWN \
793
-    )
794
-  #error "PULLDOWN pin mode is not available on the selected board."
795
-#endif
796
-
797 785
 #if BOTH(ENDSTOPPULLUPS, ENDSTOPPULLDOWNS)
798 786
   #error "Enable only one of ENDSTOPPULLUPS or ENDSTOPPULLDOWNS."
799 787
 #elif BOTH(FIL_RUNOUT_PULLUP, FIL_RUNOUT_PULLDOWN)

Loading…
取消
儲存