Struct imxrt_hal::gpio::GPIO [−][src]
pub struct GPIO<P, D> { /* fields omitted */ }
Implementations
Returns true
if the GPIO is configured for fast mode
If the GPIO cannot support fast mode, is_fast()
always returns false
Configures the GPIO to fast mode. true
indicates “fast,” and false
indicates “normal.”
Returns false
if this pin does not support fast mode. Otherwise, returns true
, indicating
that the setting was respected.
If you transition an output pin into fast mode, the GPIO output state may not be maintained. That is, if your GPIO pin was high, a transition into fast mode may set the pin low. Consider setting fast mode before driving the GPIO output to avoid inconsistencies.
Create a GPIO from a pad that supports a GPIO configuration
All pads may be used as a GPIO, so this should always work.
Set the GPIO as an output.
Any interrupt configuration will be cleared and needs redoing if the pin is transitioned back to an input.
Enable (true
) or disable (false
) interrupts for this GPIO input.
Indicates if interrupts are (true
) or are not (false
) enabled for this GPIO input.
pub fn set_interrupt_configuration(
&mut self,
interrupt_configuration: InterruptConfiguration
)
pub fn set_interrupt_configuration(
&mut self,
interrupt_configuration: InterruptConfiguration
)
Set the interrupt configuration for this GPIO input.
Indicates whether this GPIO input triggered an interrupt.
Clear the interrupt status flag.