Browse Source

♻️ Watchdog followup

Followup to 52eefa90e1
Scott Lahteine 2 years ago
parent
commit
04d0d9431b

+ 4
- 4
Marlin/src/HAL/STM32/msc_sd.cpp View File

57
     auto sd2card = diskIODriver();
57
     auto sd2card = diskIODriver();
58
     // single block
58
     // single block
59
     if (blkLen == 1) {
59
     if (blkLen == 1) {
60
-      watchdog_refresh();
60
+      hal.watchdog_refresh();
61
       sd2card->writeBlock(blkAddr, pBuf);
61
       sd2card->writeBlock(blkAddr, pBuf);
62
       return true;
62
       return true;
63
     }
63
     }
65
     // multi block optimization
65
     // multi block optimization
66
     sd2card->writeStart(blkAddr, blkLen);
66
     sd2card->writeStart(blkAddr, blkLen);
67
     while (blkLen--) {
67
     while (blkLen--) {
68
-      watchdog_refresh();
68
+      hal.watchdog_refresh();
69
       sd2card->writeData(pBuf);
69
       sd2card->writeData(pBuf);
70
       pBuf += BLOCK_SIZE;
70
       pBuf += BLOCK_SIZE;
71
     }
71
     }
77
     auto sd2card = diskIODriver();
77
     auto sd2card = diskIODriver();
78
     // single block
78
     // single block
79
     if (blkLen == 1) {
79
     if (blkLen == 1) {
80
-      watchdog_refresh();
80
+      hal.watchdog_refresh();
81
       sd2card->readBlock(blkAddr, pBuf);
81
       sd2card->readBlock(blkAddr, pBuf);
82
       return true;
82
       return true;
83
     }
83
     }
85
     // multi block optimization
85
     // multi block optimization
86
     sd2card->readStart(blkAddr);
86
     sd2card->readStart(blkAddr);
87
     while (blkLen--) {
87
     while (blkLen--) {
88
-      watchdog_refresh();
88
+      hal.watchdog_refresh();
89
       sd2card->readData(pBuf);
89
       sd2card->readData(pBuf);
90
       pBuf += BLOCK_SIZE;
90
       pBuf += BLOCK_SIZE;
91
     }
91
     }

+ 1
- 1
Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp View File

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

Loading…
Cancel
Save