Module imxrt_hal::gpio [−][src]
GPIOs
This GPIO driver supports the embedded_hal
’s v2
digital traits.
Fast and Normal GPIOs
High speed, or “fast,” GPIOs are GPIOs that run on the AHB clock. Normal GPIOs run on the IPG clock.
Example
use imxrt_hal::{self, gpio::GPIO}; let mut peripherals = imxrt_hal::Peripherals::take().unwrap(); let input = GPIO::new(peripherals.iomuxc.ad_b0.p11); assert!(!input.is_set()); let mut output = input.output(); output.set(); assert!(output.is_set()); output.toggle(); assert!(!output.is_set()); assert!(output.set_fast(true)); output.toggle(); assert!(output.is_set());
Structs
GPIO |
Enums
Input | Denotes that a pin is configured as an input |
Output | Denotes that a pin is configured as an output |