Browse Source

HW PWM sanity checks for SPINDLE_LASER_FREQUENCY (#18947)

ellensp 4 years ago
parent
commit
fd9c6983d3

+ 2
- 2
Marlin/src/HAL/DUE/inc/SanityCheck.h View File

@@ -52,8 +52,8 @@
52 52
   #endif
53 53
 #endif
54 54
 
55
-#if ENABLED(FAST_PWM_FAN)
56
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
55
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
56
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
57 57
 #endif
58 58
 
59 59
 #if HAS_TMC_SW_SERIAL

+ 2
- 2
Marlin/src/HAL/ESP32/inc/SanityCheck.h View File

@@ -25,8 +25,8 @@
25 25
   #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
26 26
 #endif
27 27
 
28
-#if ENABLED(FAST_PWM_FAN)
29
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
28
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
29
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on ESP32."
30 30
 #endif
31 31
 
32 32
 #if HAS_TMC_SW_SERIAL

+ 2
- 2
Marlin/src/HAL/LINUX/inc/SanityCheck.h View File

@@ -30,8 +30,8 @@
30 30
   #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
31 31
 #endif
32 32
 
33
-#if ENABLED(FAST_PWM_FAN)
34
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
33
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
34
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX."
35 35
 #endif
36 36
 
37 37
 #if HAS_TMC_SW_SERIAL

+ 1
- 1
Marlin/src/HAL/LPC1768/fast_pwm.cpp View File

@@ -35,5 +35,5 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
35 35
   LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
36 36
 }
37 37
 
38
-#endif // FAST_PWM_FAN || SPINDLE_LASER_PWM
38
+#endif // NEEDS_HARDWARE_PWM
39 39
 #endif // TARGET_LPC1768

+ 4
- 0
Marlin/src/HAL/LPC1768/inc/SanityCheck.h View File

@@ -59,6 +59,10 @@
59 59
  */
60 60
 static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are incompatible with FAST_PWM_FAN on LPC176x boards.");
61 61
 
62
+#if SPINDLE_LASER_FREQUENCY
63
+  static_assert(!NUM_SERVOS, "BLTOUCH and Servos are incompatible with SPINDLE_LASER_FREQUENCY on LPC176x boards.");
64
+#endif
65
+
62 66
 /**
63 67
  * Test LPC176x-specific configuration values for errors at compile-time.
64 68
  */

+ 2
- 2
Marlin/src/HAL/SAMD51/inc/SanityCheck.h View File

@@ -47,6 +47,6 @@
47 47
   #error "SDIO_SUPPORT is not supported on SAMD51."
48 48
 #endif
49 49
 
50
-#if ENABLED(FAST_PWM_FAN)
51
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
50
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
51
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51."
52 52
 #endif

+ 2
- 2
Marlin/src/HAL/STM32/inc/SanityCheck.h View File

@@ -28,8 +28,8 @@
28 28
 //  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
29 29
 //#endif
30 30
 
31
-#if ENABLED(FAST_PWM_FAN)
32
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
31
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
32
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32."
33 33
 #endif
34 34
 
35 35
 #if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)

+ 2
- 2
Marlin/src/HAL/STM32F1/inc/SanityCheck.h View File

@@ -29,8 +29,8 @@
29 29
   #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
30 30
 #endif
31 31
 
32
-#if ENABLED(FAST_PWM_FAN)
33
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
32
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32F1."
34 34
 #endif
35 35
 
36 36
 #if !defined(HAVE_SW_SERIAL) && HAS_TMC_SW_SERIAL

+ 2
- 2
Marlin/src/HAL/STM32_F4_F7/inc/SanityCheck.h View File

@@ -32,8 +32,8 @@
32 32
   #error "EMERGENCY_PARSER is not yet implemented for STM32F4/7. Disable EMERGENCY_PARSER to continue."
33 33
 #endif
34 34
 
35
-#if ENABLED(FAST_PWM_FAN)
36
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
35
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
36
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32F4/F7."
37 37
 #endif
38 38
 
39 39
 #if HAS_TMC_SW_SERIAL

+ 2
- 2
Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h View File

@@ -29,8 +29,8 @@
29 29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
30 30
 #endif
31 31
 
32
-#if ENABLED(FAST_PWM_FAN)
33
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
32
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.1/3.2."
34 34
 #endif
35 35
 
36 36
 #if HAS_TMC_SW_SERIAL

+ 2
- 2
Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h View File

@@ -29,8 +29,8 @@
29 29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
30 30
 #endif
31 31
 
32
-#if ENABLED(FAST_PWM_FAN)
33
-  #error "FAST_PWM_FAN is not yet implemented for this platform."
32
+#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
33
+  #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.5/3.6."
34 34
 #endif
35 35
 
36 36
 #if HAS_TMC_SW_SERIAL

Loading…
Cancel
Save