Browse Source

STM32F1: Restore M43 build support (#17336)

Tanguy Pruvot 5 years ago
parent
commit
c759729478
No account linked to committer's email address
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      Marlin/src/gcode/config/M43.cpp

+ 10
- 2
Marlin/src/gcode/config/M43.cpp View File

@@ -67,7 +67,11 @@ inline void toggle_pins() {
67 67
     else {
68 68
       watchdog_refresh();
69 69
       report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing   "));
70
-      const bool prior_mode = GET_PINMODE(pin);
70
+      #ifdef __STM32F1__
71
+        const auto prior_mode = _GET_MODE(i);
72
+      #else
73
+        const bool prior_mode = GET_PINMODE(pin);
74
+      #endif
71 75
       #if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
72 76
         if (pin == TEENSY_E2) {
73 77
           SET_OUTPUT(TEENSY_E2);
@@ -96,7 +100,11 @@ inline void toggle_pins() {
96 100
           watchdog_refresh();
97 101
         }
98 102
       }
99
-      pinMode(pin, prior_mode);
103
+      #ifdef __STM32F1__
104
+        _SET_MODE(i, prior_mode);
105
+      #else
106
+        pinMode(pin, prior_mode);
107
+      #endif
100 108
     }
101 109
     SERIAL_EOL();
102 110
   }

Loading…
Cancel
Save