♻️ Move watchdog to MarlinHAL

This commit is contained in:
Scott Lahteine
2022-05-22 20:45:37 -05:00
parent 209c792ef7
commit 07cd248b91
64 changed files with 510 additions and 1106 deletions

View File

@ -1226,10 +1226,10 @@ inline void loud_kill(FSTR_P const lcd_msg, const heater_id_t heater_id) {
thermalManager.disable_all_heaters();
#if HAS_BEEPER
for (uint8_t i = 20; i--;) {
watchdog_refresh();
hal.watchdog_refresh();
buzzer.click(25);
delay(80);
watchdog_refresh();
hal.watchdog_refresh();
}
buzzer.on();
#endif
@ -1274,7 +1274,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, FSTR_P const serial_m
}
disable_all_heaters(); // always disable (even for bogus temp)
watchdog_refresh();
hal.watchdog_refresh();
#if BOGUS_TEMPERATURE_GRACE_PERIOD
const millis_t ms = millis();
@ -1638,7 +1638,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) {
* - Update the heated bed PID output value
*/
void Temperature::manage_heater() {
if (marlin_state == MF_INITIALIZING) return watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog!
if (marlin_state == MF_INITIALIZING) return hal.watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog!
static bool no_reentry = false; // Prevent recursion
if (no_reentry) return;
@ -2387,7 +2387,7 @@ void Temperature::manage_heater() {
*/
void Temperature::updateTemperaturesFromRawValues() {
watchdog_refresh(); // Reset because raw_temps_ready was set by the interrupt
hal.watchdog_refresh(); // Reset because raw_temps_ready was set by the interrupt
TERN_(TEMP_SENSOR_0_IS_MAX_TC, temp_hotend[0].setraw(READ_MAX_TC(0)));
TERN_(TEMP_SENSOR_1_IS_MAX_TC, temp_hotend[1].setraw(READ_MAX_TC(1)));