Skip to main content

Crate mwdg_ffi

Crate mwdg_ffi 

Source
Expand description

§mwdg-ffi — C FFI bindings for the mwdg micro-watchdog library

This crate provides C-compatible bindings for the mwdg library, enabling use from C/C++ code. Use the generated include/mwdg.h header for the proper interface declarations.

A user of the library must provide the following functions:

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.