#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

#2346 in Hardware support

Download history 110/week @ 2025-09-18 117/week @ 2025-09-25 79/week @ 2025-10-02 124/week @ 2025-10-09 143/week @ 2025-10-16 139/week @ 2025-10-23 92/week @ 2025-10-30 123/week @ 2025-11-06 226/week @ 2025-11-13 131/week @ 2025-11-20 96/week @ 2025-11-27 105/week @ 2025-12-04 80/week @ 2025-12-11 133/week @ 2025-12-18 31/week @ 2025-12-25 48/week @ 2026-01-01

318 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