pub struct Input { /* private fields */ }Expand description
An input GPIO.
Implementations§
Source§impl Input
impl Input
Sourcepub fn is_triggered(&self) -> bool
pub fn is_triggered(&self) -> bool
Returns true if the GPIO interrupt has triggered.
Sourcepub fn clear_triggered(&self)
pub fn clear_triggered(&self)
Clear the interrupt triggered flag.
Sourcepub fn is_interrupt_enabled(&self) -> bool
pub fn is_interrupt_enabled(&self) -> bool
Indicates if interrupts are enabled for this input.
Sourcepub fn without_pin(port: &mut Port, offset: u32) -> Self
pub fn without_pin(port: &mut Port, offset: u32) -> Self
Allocate an input GPIO without a pin.
Prefer using Port::input to create a GPIO input with a
pin resource. That method ensures that pin resources are managed throughout
your program, and that the pin is configured to operate as a GPIO input.
You may use this method to allocate duplicate Input object for the same
physical GPIO input. This is considered safe, since the Input API is
reentrant. Any non-reentrant methods are attached to Port, which cannot
be constructed without an unsafe constructor of the register block.
If you use this constructor, you’re responsible for configuring the IOMUX multiplexer register.