#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

#1592 in Hardware support

Download history 21/week @ 2024-04-08 41/week @ 2024-04-15 45/week @ 2024-04-22 38/week @ 2024-04-29 22/week @ 2024-05-06 33/week @ 2024-05-13 16/week @ 2024-05-20 48/week @ 2024-05-27 24/week @ 2024-06-03 18/week @ 2024-06-10 33/week @ 2024-06-17 17/week @ 2024-06-24 39/week @ 2024-07-01 9/week @ 2024-07-08 158/week @ 2024-07-15 37/week @ 2024-07-22

244 downloads per month
Used in 2 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