mwdg - Micro-Watchdog Library
A no_std software micro-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 that 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.
Usage
To use in Rust projects:
[]
= "0.2"
To use in C/C++ projects, see info below.
Build static library
# Build for ARMv7-M FP
cargo rustc --target thumbv7em-none-eabihf --features "pack" -- --crate-type staticlib
The target/thumbv7em-none-eabihf/release will contain the libmwdg.rlib that can be renamed into the
libmwdg.a and used along with the header mwdg.h file from the include/ directory in your C/C++ project.
Examples
Simple examples on how to use library in Rust and C/C++ are available in the examples directory.
Contribution
Contributions are always welcome! If you have an idea, it's best to float it by me before working on it to ensure no effort is wasted. If there's already an open issue for it, knock yourself out. See the contributing section for additional details