pub struct Input<'d> { /* private fields */ }Expand description
Digital input pin driver.
Implementations§
Source§impl<'d> Input<'d>
impl<'d> Input<'d>
pub fn is_high(&self) -> bool
pub fn is_low(&self) -> bool
pub fn number(&self) -> u8
pub fn enable_interrupt(&self)
pub fn disable_interrupt(&self)
pub fn clear_interrupt(&self)
Sourcepub fn set_interrupt_trigger(&self, trigger: InterruptTrigger)
pub fn set_interrupt_trigger(&self, trigger: InterruptTrigger)
Set the interrupt trigger condition for this pin (edge/level + polarity).
Configures GPIO_INT_TYPE (edge vs level) and GPIO_INT_POLARITY
(rising/high vs falling/low). Call before enable_interrupt.
pub fn interrupt_pending(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'d> !UnwindSafe for Input<'d>
impl<'d> Freeze for Input<'d>
impl<'d> RefUnwindSafe for Input<'d>
impl<'d> Send for Input<'d>
impl<'d> Sync for Input<'d>
impl<'d> Unpin for Input<'d>
impl<'d> UnsafeUnpin for Input<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more