Browse Source

HW PWM sanity checks for SPINDLE_LASER_FREQUENCY (#18947)

ellensp 3 years ago
parent
commit
f2f1d8fa21
No account linked to committer's email address

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

52
   #endif
52
   #endif
53
 #endif
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
 #endif
57
 #endif
58
 
58
 
59
 #if HAS_TMC_SW_SERIAL
59
 #if HAS_TMC_SW_SERIAL

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

25
   #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
25
   #error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
26
 #endif
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
 #endif
30
 #endif
31
 
31
 
32
 #if HAS_TMC_SW_SERIAL
32
 #if HAS_TMC_SW_SERIAL

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

30
   #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
30
   #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
31
 #endif
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
 #endif
35
 #endif
36
 
36
 
37
 #if HAS_TMC_SW_SERIAL
37
 #if HAS_TMC_SW_SERIAL

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

35
   LPC176x::pwm_write_ratio(pin, invert ? 1.0f - (float)v / v_size : (float)v / v_size);
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
 #endif // TARGET_LPC1768
39
 #endif // TARGET_LPC1768

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

59
  */
59
  */
60
 static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are incompatible with FAST_PWM_FAN on LPC176x boards.");
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
  * Test LPC176x-specific configuration values for errors at compile-time.
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
   #error "SDIO_SUPPORT is not supported on SAMD51."
47
   #error "SDIO_SUPPORT is not supported on SAMD51."
48
 #endif
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
 #endif
52
 #endif

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

28
 //  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
28
 //  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
29
 //#endif
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
 #endif
33
 #endif
34
 
34
 
35
 #if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)
35
 #if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT)

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

29
   #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
29
   #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
30
 #endif
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
 #endif
34
 #endif
35
 
35
 
36
 #if !defined(HAVE_SW_SERIAL) && HAS_TMC_SW_SERIAL
36
 #if !defined(HAVE_SW_SERIAL) && HAS_TMC_SW_SERIAL

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

32
   #error "EMERGENCY_PARSER is not yet implemented for STM32F4/7. Disable EMERGENCY_PARSER to continue."
32
   #error "EMERGENCY_PARSER is not yet implemented for STM32F4/7. Disable EMERGENCY_PARSER to continue."
33
 #endif
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
 #endif
37
 #endif
38
 
38
 
39
 #if HAS_TMC_SW_SERIAL
39
 #if HAS_TMC_SW_SERIAL

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

29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
30
 #endif
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
 #endif
34
 #endif
35
 
35
 
36
 #if HAS_TMC_SW_SERIAL
36
 #if HAS_TMC_SW_SERIAL

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

29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
29
   #error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
30
 #endif
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
 #endif
34
 #endif
35
 
35
 
36
 #if HAS_TMC_SW_SERIAL
36
 #if HAS_TMC_SW_SERIAL

Loading…
Cancel
Save