浏览代码

Sanity check ADC pins and FAST_PWM_FAN with Servos (#16038)

Chris Pepper 5 年前
父节点
当前提交
a63491e6eb
共有 1 个文件被更改,包括 29 次插入0 次删除
  1. 29
    0
      Marlin/src/HAL/HAL_LPC1768/inc/SanityCheck.h

+ 29
- 0
Marlin/src/HAL/HAL_LPC1768/inc/SanityCheck.h 查看文件

@@ -29,6 +29,35 @@
29 29
 #endif
30 30
 
31 31
 /**
32
+ * Detect an old pins file by checking for old ADC pins values.
33
+ */
34
+#define _OLD_TEMP_PIN(P) PIN_EXISTS(TEMP_BED) && _CAT(P,_PIN) <= 7 && _CAT(P,_PIN) != 2 && _CAT(P,_PIN) != 3
35
+#if _OLD_TEMP_PIN(TEMP_BED)
36
+  #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
37
+#elif _OLD_TEMP_PIN(TEMP_0)
38
+  #error "TEMP_0_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
39
+#elif _OLD_TEMP_PIN(TEMP_1)
40
+  #error "TEMP_1_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
41
+#elif _OLD_TEMP_PIN(TEMP_2)
42
+  #error "TEMP_2_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
43
+#elif _OLD_TEMP_PIN(TEMP_3)
44
+  #error "TEMP_3_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
45
+#elif _OLD_TEMP_PIN(TEMP_4)
46
+  #error "TEMP_4_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
47
+#elif _OLD_TEMP_PIN(TEMP_5)
48
+  #error "TEMP_5_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
49
+#endif
50
+#undef _OLD_TEMP_PIN
51
+
52
+/**
53
+ * Because PWM hardware channels all share the same frequency, along with the
54
+ * fallback software channels, FAST_PWM_FAN is incompatible with Servos.
55
+ */
56
+#if NUM_SERVOS > 0 && ENABLED(FAST_PWM_FAN)
57
+  #error "BLTOUCH and Servos are incompatible with FAST_PWM_FAN on LPC176x boards."
58
+#endif
59
+
60
+/**
32 61
  * Test LPC176x-specific configuration values for errors at compile-time.
33 62
  */
34 63
 

正在加载...
取消
保存