rktk_drivers_common/keyscan/flex_pin.rs
1pub enum Pull {
2 Up,
3 Down,
4}
5
6#[allow(async_fn_in_trait)]
7pub trait FlexPin {
8 fn set_as_input(&mut self);
9 fn set_as_output(&mut self);
10 fn set_low(&mut self);
11 fn set_high(&mut self);
12 fn is_high(&self) -> bool;
13 fn is_low(&self) -> bool;
14 async fn wait_for_high(&mut self);
15 async fn wait_for_low(&mut self);
16 fn set_pull(&mut self, pull: Pull);
17}