Browse Source

[2.0.x] Error for FAST_PWM_FAN with 32 bit CPU (#10798)

Bob Kuhn 7 years ago
parent
commit
d557c84a71
2 changed files with 5 additions and 1 deletions
  1. 4
    0
      Marlin/src/inc/SanityCheck.h
  2. 1
    1
      Marlin/src/module/temperature.cpp

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

1730
   #error "POWER_LOSS_RECOVERY currently requires an LCD Controller."
1730
   #error "POWER_LOSS_RECOVERY currently requires an LCD Controller."
1731
 #endif
1731
 #endif
1732
 
1732
 
1733
+#if ENABLED(FAST_PWM_FAN) && !(defined(ARDUINO) && !defined(ARDUINO_ARCH_SAM))
1734
+  #error "FAST_PWM_FAN only supported by 8 bit CPUs."
1735
+#endif
1736
+
1733
 #endif // _SANITYCHECK_H_
1737
 #endif // _SANITYCHECK_H_

+ 1
- 1
Marlin/src/module/temperature.cpp View File

1385
 #if ENABLED(FAST_PWM_FAN)
1385
 #if ENABLED(FAST_PWM_FAN)
1386
 
1386
 
1387
   void Temperature::setPwmFrequency(const pin_t pin, int val) {
1387
   void Temperature::setPwmFrequency(const pin_t pin, int val) {
1388
-    #ifdef ARDUINO
1388
+    #if defined(ARDUINO) && !defined(ARDUINO_ARCH_SAM)
1389
       val &= 0x07;
1389
       val &= 0x07;
1390
       switch (digitalPinToTimer(pin)) {
1390
       switch (digitalPinToTimer(pin)) {
1391
         #ifdef TCCR0A
1391
         #ifdef TCCR0A

Loading…
Cancel
Save