pub struct EncoderSwitch<'peripherals> {
col: u8,
debounce: Duration,
last_pressed: bool,
pin: ExtiInput<'peripherals, Async>,
row: u8,
}Expand description
Debounced encoder switch exposed as an input device.
Fields§
§col: u8Logical column index reported to the input system.
debounce: DurationDebounce duration applied to state changes.
last_pressed: boolLast debounced logical state of the switch.
pin: ExtiInput<'peripherals, Async>External interrupt–backed input pin for the switch.
row: u8Logical row index reported to the input system.
Implementations§
Source§impl<'peripherals> EncoderSwitch<'peripherals>
impl<'peripherals> EncoderSwitch<'peripherals>
Sourcepub const fn new(pin: ExtiInput<'peripherals, Async>, row: u8, col: u8) -> Self
pub const fn new(pin: ExtiInput<'peripherals, Async>, row: u8, col: u8) -> Self
Create a new encoder switch input wrapper.
Sourceasync fn read_keyboard_event(&mut self) -> KeyboardEvent
async fn read_keyboard_event(&mut self) -> KeyboardEvent
Wait for the next debounced encoder switch event.