瀏覽代碼

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

Tanguy Pruvot 3 年之前
父節點
當前提交
9a9d55ceb0
No account linked to committer's email address
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/src/gcode/control/M42.cpp

+ 1
- 1
Marlin/src/gcode/control/M42.cpp 查看文件

@@ -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…
取消
儲存