File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,14 @@ class RP2040 {
314
314
reboot ();
315
315
}
316
316
317
+ void wdt_begin (uint32_t delay_ms) {
318
+ watchdog_enable (delay_ms, 1 );
319
+ }
320
+
321
+ void wdt_reset () {
322
+ watchdog_update ();
323
+ }
324
+
317
325
const char *getChipID () {
318
326
static char id[PICO_UNIQUE_BOARD_ID_SIZE_BYTES + 1 ] = { 0 };
319
327
if (!id[0 ]) {
Original file line number Diff line number Diff line change @@ -37,6 +37,20 @@ void rp2040.reboot()
37
37
~~~~~~~~~~~~~~~~~~~~
38
38
Forces a hardware reboot of the Pico.
39
39
40
+ Hardware Watchdog
41
+ _________________
42
+
43
+ void rp2040.wdt_begin(uint32_t delay_ms)
44
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
+ Enables the hardware watchdog timer with a delay value of delay_ms
46
+ microseconds. Note that on the RP2040, once this function has called, the
47
+ hardware watchdog can _not_ be disabled.
48
+
49
+ void rp2040.wdt_reset()
50
+ ~~~~~~~~~~~~~~~~
51
+ Reloads the watchdog's counter with the amount of time set by wdt_begin.
52
+
53
+
40
54
Memory Information
41
55
------------------
42
56
You can’t perform that action at this time.
0 commit comments