Watchdog cleanup (#15283)
This commit is contained in:
@ -50,12 +50,6 @@
|
||||
#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),
|
||||
@ -71,7 +65,7 @@ inline void toggle_pins() {
|
||||
SERIAL_EOL();
|
||||
}
|
||||
else {
|
||||
_watchdog_reset();
|
||||
watchdog_refresh();
|
||||
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) {
|
||||
@ -95,10 +89,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_refresh(); extDigitalWrite(pin, 0); safe_delay(wait);
|
||||
watchdog_refresh(); extDigitalWrite(pin, 1); safe_delay(wait);
|
||||
watchdog_refresh(); extDigitalWrite(pin, 0); safe_delay(wait);
|
||||
watchdog_refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ void GcodeSuite::M917() {
|
||||
}
|
||||
DEBUG_ECHOLNPGM(".");
|
||||
reset_stepper_timeout(); // reset_stepper_timeout to keep steppers powered
|
||||
watchdog_reset(); // beat the dog
|
||||
watchdog_refresh();
|
||||
safe_delay(5000);
|
||||
status_composite_temp = 0;
|
||||
for (j = 0; j < driver_count; j++) {
|
||||
|
Reference in New Issue
Block a user