Skip to content

Commit

Permalink
STM32F1: Restore M43 build support (MarlinFirmware#17336)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot authored and mathom committed Apr 16, 2020
1 parent 9e726cd commit 55fe03c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Marlin/src/gcode/config/M43.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ inline void toggle_pins() {
else {
watchdog_refresh();
report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing "));
const bool prior_mode = GET_PINMODE(pin);
#ifdef __STM32F1__
const auto prior_mode = _GET_MODE(i);
#else
const bool prior_mode = GET_PINMODE(pin);
#endif
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
SET_OUTPUT(TEENSY_E2);
Expand Down Expand Up @@ -96,7 +100,11 @@ inline void toggle_pins() {
watchdog_refresh();
}
}
pinMode(pin, prior_mode);
#ifdef __STM32F1__
_SET_MODE(i, prior_mode);
#else
pinMode(pin, prior_mode);
#endif
}
SERIAL_EOL();
}
Expand Down

0 comments on commit 55fe03c

Please sign in to comment.