1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 21:36:21 +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(); auto sd2card = diskIODriver();
// single block // single block
if (blkLen == 1) { if (blkLen == 1) {
watchdog_refresh(); hal.watchdog_refresh();
sd2card->writeBlock(blkAddr, pBuf); sd2card->writeBlock(blkAddr, pBuf);
return true; return true;
} }
@ -65,7 +65,7 @@ public:
// multi block optimization // multi block optimization
sd2card->writeStart(blkAddr, blkLen); sd2card->writeStart(blkAddr, blkLen);
while (blkLen--) { while (blkLen--) {
watchdog_refresh(); hal.watchdog_refresh();
sd2card->writeData(pBuf); sd2card->writeData(pBuf);
pBuf += BLOCK_SIZE; pBuf += BLOCK_SIZE;
} }
@ -77,7 +77,7 @@ public:
auto sd2card = diskIODriver(); auto sd2card = diskIODriver();
// single block // single block
if (blkLen == 1) { if (blkLen == 1) {
watchdog_refresh(); hal.watchdog_refresh();
sd2card->readBlock(blkAddr, pBuf); sd2card->readBlock(blkAddr, pBuf);
return true; return true;
} }
@ -85,7 +85,7 @@ public:
// multi block optimization // multi block optimization
sd2card->readStart(blkAddr); sd2card->readStart(blkAddr);
while (blkLen--) { while (blkLen--) {
watchdog_refresh(); hal.watchdog_refresh();
sd2card->readData(pBuf); sd2card->readData(pBuf);
pBuf += BLOCK_SIZE; 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 // So we'll just need to refresh the watchdog for a while and then stop for the system to reboot
uint32_t last = start; uint32_t last = start;
while (PENDING(last, end)) { while (PENDING(last, end)) {
watchdog_refresh(); hal.watchdog_refresh();
while (millis() == last) { /* nada */ } while (millis() == last) { /* nada */ }
last = millis(); last = millis();
MinSerial::TX('.'); MinSerial::TX('.');