Fix M43 without watchdog (#15280)

2.0.x
Bas Stottelaar 5 years ago committed by Scott Lahteine
parent 7e95ee9e4b
commit 847e4ced11

@ -50,6 +50,12 @@
#define GET_PIN_MAP_PIN_M43(Q) GET_PIN_MAP_PIN(Q)
#endif
inline void _watchdog_reset() {
#if ENABLED(USE_WATCHDOG)
watchdog_reset();
#endif
}
inline void toggle_pins() {
const bool ignore_protection = parser.boolval('I');
const int repeat = parser.intval('R', 1),
@ -65,7 +71,7 @@ inline void toggle_pins() {
SERIAL_EOL();
}
else {
watchdog_reset();
_watchdog_reset();
report_pin_state_extended(pin, ignore_protection, true, "Pulsing ");
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
if (pin == TEENSY_E2) {
@ -89,10 +95,10 @@ inline void toggle_pins() {
{
pinMode(pin, OUTPUT);
for (int16_t j = 0; j < repeat; j++) {
watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
watchdog_reset(); extDigitalWrite(pin, 1); safe_delay(wait);
watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
watchdog_reset();
_watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
_watchdog_reset(); extDigitalWrite(pin, 1); safe_delay(wait);
_watchdog_reset(); extDigitalWrite(pin, 0); safe_delay(wait);
_watchdog_reset();
}
}
}

Loading…
Cancel
Save