1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +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 #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);
} }