#debouncer #embedded-hal #no-std

no-std debouncr

A simple no-std input debouncer to detect rising and falling edges with minimal RAM requirements

7 releases

0.2.2 Nov 21, 2020
0.2.1 Nov 17, 2020
0.1.3 Aug 20, 2020
0.1.2 Apr 28, 2020

#1424 in Hardware support

Download history 60/week @ 2024-10-29 22/week @ 2024-11-05 11/week @ 2024-11-12 15/week @ 2024-11-19 37/week @ 2024-11-26 122/week @ 2024-12-03 137/week @ 2024-12-10 254/week @ 2024-12-17 210/week @ 2024-12-24 111/week @ 2024-12-31 47/week @ 2025-01-07 82/week @ 2025-01-14 128/week @ 2025-01-21 67/week @ 2025-01-28 88/week @ 2025-02-04 60/week @ 2025-02-11

356 downloads per month
Used in 3 crates

MIT/Apache

22KB
233 lines

Debouncr

Build status Crates.io Version Crates.io Downloads No Std

A simple and efficient no_std input debouncer that uses integer bit shifting to debounce inputs. The algorithm can detect rising and falling edges and only requires 1 byte of RAM for detecting up to 8 consecutive high/low states or 2 bytes of RAM for detecting up to 16 consecutive high/low states.

The algorithm is based on the Ganssle Guide to Debouncing (section "An Alternative").

Docs: https://docs.rs/debouncr

License

Licensed under either of

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies