#debouncer #no-std #embedded-hal

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

#584 in Hardware support

Download history 20/week @ 2022-11-28 63/week @ 2022-12-05 43/week @ 2022-12-12 43/week @ 2022-12-19 25/week @ 2022-12-26 33/week @ 2023-01-02 29/week @ 2023-01-09 63/week @ 2023-01-16 37/week @ 2023-01-23 56/week @ 2023-01-30 35/week @ 2023-02-06 235/week @ 2023-02-13 583/week @ 2023-02-20 301/week @ 2023-02-27 73/week @ 2023-03-06 22/week @ 2023-03-13

1,036 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