2.30. watchdog — Hardware watchdog¶
Source code: src/drivers/watchdog.h, src/drivers/watchdog.c
Functions
-
int
watchdog_module_init(void)¶
-
int
watchdog_start_ms(int timeout)¶ Start the watchdog with given timeout. Use
watchdog_kick()to periodically restart the timer.- Return
- zero(0) or negative error code.
- Parameters
timeout: Watchdog timeout in milliseconds.
-
int
watchdog_stop(void)¶ Stop the watchdog.
- Return
- zero(0) or negative error code.
-
int
watchdog_kick(void)¶ Kick the watchdog. Restarts the watchdog timer with its original timeout given to
watchdog_start_ms(). The board will be reset if this function is not called before the watchdog timer expires.- Return
- zero(0) or negative error code.