Expand description
§mwdg - Micro-Watchdog Library
A no_std software multi-watchdog library for embedded RTOS systems.
Each RTOS task registers a mwdg_node with a timeout interval.
The task periodically calls mwdg_feed to signal liveness.
A central mwdg_check function verifies all registered watchdogs
are healthy, enabling the main loop to gate hardware watchdog resets.
§C FFI
All public functions declared to be exposed without mangling, so the library can be
linked from C/C++ code. Use the generated include/mwdg.h header for having proper
interface declaration.
A user of the library must provide the following functions that the library uses to get system timestamp in milliseconds, enter/exit critical sections.
extern uint32_t mwdg_get_time_milliseconds(void);
extern void mwdg_enter_critical(void);
extern void mwdg_exit_critical(void);Structs§
- mwdg_
node - A single software watchdog node.
Functions§
- mwdg_
add ⚠ - Register a software watchdog with the given timeout.
- mwdg_
assign_ ⚠id - Assign a user-chosen identifier to a watchdog node.
- mwdg_
check ⚠ - Check all registered watchdogs for expiration.
- mwdg_
feed ⚠ - Feed (touch) a watchdog, resetting its timestamp to the current time.
- mwdg_
get_ ⚠next_ expired - Iterate over registered watchdogs and find the next expired one.
- mwdg_
init ⚠ - Initialize the multi-watchdog subsystem.
- mwdg_
remove ⚠ - Remove a previously registered watchdog from the global list.