mwdg 0.2.0

Micro-watchdog library for embedded RTOS systems with C FFI
Documentation
  • Coverage
  • 92.31%
    12 out of 13 items documented0 out of 4 items with examples
  • Size
  • Source code size: 84.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.69 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • vpetrigo/mwdg
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vpetrigo

GitHub Actions Workflow Status docs.rs codecov

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:

[dependencies]
mwdg = "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

License