[][src]Module rmicrobit::buttons::debouncing

Algorithms for debouncing buttons.

These algorithms assume the button is polled at a regular interval.

With a 6ms poll interval, the micro:bit's built-in buttons seem to perform accurately with no additional debouncing.

Structs

CountingDebouncer

A debouncer based on net open/closed counts, with saturation.

TrivialDebouncer

A 'debouncer' which returns the most recent polled state unchanged.

Traits

Debounce

A debouncing algorithm and an associated state.