| 65 | } |
| 66 | |
| 67 | void Watchdog::begin(fl::u32 timeout_ms) FL_NOEXCEPT { |
| 68 | if (timeout_ms == 0) timeout_ms = 1000; |
| 69 | if (timeout_ms > FL_WATCHDOG_MAX_TIMEOUT_MS) timeout_ms = FL_WATCHDOG_MAX_TIMEOUT_MS; |
| 70 | // Second arg `pause_on_debug` defaults to true — useful in dev so a |
| 71 | // debugger session doesn't reset the chip during a breakpoint. |
| 72 | watchdog_enable(timeout_ms, true); |
| 73 | platforms::rpWatchdogState().armed = true; |
| 74 | } |
| 75 | |
| 76 | void Watchdog::feed() FL_NOEXCEPT { |
| 77 | watchdog_update(); |
no outgoing calls
no test coverage detected