ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Go to the source code of this file.
Typedefs | |
typedef void(* | wdt_evt_handler_t) (void) |
Enable implementation selected by application. More... | |
Functions | |
rd_status_t | ri_watchdog_init (const uint32_t interval_ms, const wdt_evt_handler_t handler) |
rd_status_t | ri_watchdog_feed (void) |
Interface for Watchdog basic usage. Typical use:
Definition in file ruuvi_interface_watchdog.h.
typedef void(* wdt_evt_handler_t) (void) |
Enable implementation selected by application.
Watchdog event handler function.
Set up at initialization, gets called on watchdog triggered.
Definition at line 44 of file ruuvi_interface_watchdog.h.
rd_status_t ri_watchdog_feed | ( | void | ) |
"Feed" the watchdog, resets the watchdog timer. This must be called after watchdog initialization or the program will reset.
rd_status_t ri_watchdog_init | ( | const uint32_t | interval_ms, |
const wdt_evt_handler_t | handler | ||
) |
Initializes watchdog module. After initialization watchdog must be fed at given interval or the program will reset. There is not way to uninitialize the watchdog. Consider bootloader watchdog interval on setup.
interval_ms | Watchdog will reset program unless fed faster than this. |
handler | Handler for watchdog event. |
RD_SUCCESS | on success, error code on failure. |