Browse Source

🩹 Allow M42 S0/1 analogWrite on PWM pins (STM32) (#22631)

Tanguy Pruvot 3 years ago
parent
commit
9a9d55ceb0
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/gcode/control/M42.cpp

+ 1
- 1
Marlin/src/gcode/control/M42.cpp View File

@@ -127,7 +127,7 @@ void GcodeSuite::M42() {
127 127
 
128 128
   #ifdef ARDUINO_ARCH_STM32
129 129
     // A simple I/O will be set to 0 by analogWrite()
130
-    if (pin_status <= 1) return;
130
+    if (pin_status <= 1 && !PWM_PIN(pin)) return;
131 131
   #endif
132 132
   analogWrite(pin, pin_status);
133 133
 }

Loading…
Cancel
Save