4c089134ef
WindowWatchdog configures a timer channel to capture both edges of an input and compare the time between edges to a duration range. In other words, it expects a ~50% duty cycle square wave on its input. One possible use for this is to monitor whether another device is functional. If VALID_THRESHOLD (currently 2) edge intervals are within range, ok() returns true, otherwise, if an edge is outside of the valid range ok() returns false. state_change() runs the calling task whenever the ok() state changes. |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml |