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.

Returns true if this input pin is high

Enable (true) or disable (false) interrupts for this GPIO input.

Indicates if interrupts are (true) or are not (false) enabled for this GPIO input.

Set the interrupt configuration for this GPIO input.

Indicates whether this GPIO input triggered an interrupt.

Clear the interrupt status flag.

Transition the pin back to an input

Set the GPIO high

Set the GPIO low

Returns true if the pin is high

Alternate the state of the pin

Trait Implementations

Error type

Is the input pin high?

Is the input pin low?

Error type

Drives the pin high Read more

Drives the pin low Read more

Drives the pin high or low depending on the provided value Read more

Is the pin in drive high mode? Read more

Is the pin in drive low mode? Read more

Error type

Toggle pin output.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.