Skip to content

Commit

Permalink
🩹 Allow M42 S0/1 analogWrite on PWM pins (STM32) (#22631)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot authored Sep 1, 2021
1 parent 01d1192 commit 9a9d55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/gcode/control/M42.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void GcodeSuite::M42() {

#ifdef ARDUINO_ARCH_STM32
// 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
analogWrite(pin, pin_status);
}
Expand Down

0 comments on commit 9a9d55c

Please sign in to comment.