Module avr_oxide::devices::debouncer

source ·
Expand description

A wrapper around a standard Pin which adds simple software debouncing.

§Usage

Anywhere you would use a Pin, you can use a Debouncer instead. Create the debouncer using one of the methods provided by the avr_oxide::devices::UsesPin trait, passing the pin you wish to wrap to the constructor.

  let supervisor = avr_oxide::oxide::instance();

  let mut green_button = StaticWrap::new(OxideButton::using(Debouncer::with_pin(board::pin_a(2))));

Structs§