1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-23 12:04:19 +00:00

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

This commit is contained in:
Tanguy Pruvot 2021-09-02 01:45:17 +02:00 committed by Scott Lahteine
parent b4b69c0de3
commit 105fd73c28

View File

@ -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);
}