Browse Source

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

vanilla_fb_2.0.x
Tanguy Pruvot 3 years ago
committed by Scott Lahteine
parent
commit
105fd73c28
  1. 2
      Marlin/src/gcode/control/M42.cpp

2
Marlin/src/gcode/control/M42.cpp

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

Loading…
Cancel
Save