1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

♻️ Watchdog followup

Followup to 52eefa90e1
This commit is contained in:
Scott Lahteine 2022-05-22 20:44:43 -05:00
parent a5e1d4c50a
commit 04d0d9431b
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ public:
auto sd2card = diskIODriver();
// single block
if (blkLen == 1) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->writeBlock(blkAddr, pBuf);
return true;
}
@ -65,7 +65,7 @@ public:
// multi block optimization
sd2card->writeStart(blkAddr, blkLen);
while (blkLen--) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->writeData(pBuf);
pBuf += BLOCK_SIZE;
}
@ -77,7 +77,7 @@ public:
auto sd2card = diskIODriver();
// single block
if (blkLen == 1) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->readBlock(blkAddr, pBuf);
return true;
}
@ -85,7 +85,7 @@ public:
// multi block optimization
sd2card->readStart(blkAddr);
while (blkLen--) {
watchdog_refresh();
hal.watchdog_refresh();
sd2card->readData(pBuf);
pBuf += BLOCK_SIZE;
}

View File

@ -221,7 +221,7 @@ bool resume_from_fault() {
// So we'll just need to refresh the watchdog for a while and then stop for the system to reboot
uint32_t last = start;
while (PENDING(last, end)) {
watchdog_refresh();
hal.watchdog_refresh();
while (millis() == last) { /* nada */ }
last = millis();
MinSerial::TX('.');