#debouncer #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

#2626 in Hardware support

Download history 106/week @ 2026-01-19 112/week @ 2026-01-26 145/week @ 2026-02-02 143/week @ 2026-02-09 152/week @ 2026-02-16 171/week @ 2026-02-23 157/week @ 2026-03-02 210/week @ 2026-03-09 128/week @ 2026-03-16 168/week @ 2026-03-23 149/week @ 2026-03-30 127/week @ 2026-04-06 142/week @ 2026-04-13 140/week @ 2026-04-20 135/week @ 2026-04-27 216/week @ 2026-05-04

639 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