[][src]Module imxrt_hal::iomuxc::pin_config

Pin configuration

All GPIOs take a given PinConfig that specifies features like

  • pull up/down resistor connectivity and resistance
  • pin speed
  • pin drive strength

If the PinConfig does not write to all fields, which is checked by PinConfig::is_modify() the config is applied as a modification to the current PAD_MUX_PAD register value.

Otherwise the PAD_MUX_PAD register is overwritten with the new configuration.

PinConfig docs supply more information on how to build a PinConfig and what typical defaults from the reference manual look like.

Example using const builder functions

use imxrt_hal::iomuxc::pin_config::*;
use imxrt_hal::Peripherals;

const LED_PIN_CONFIG: PinConfig = PinConfig::with_none()
                     .set_pull_up(PullUp::PullUp_100KOhm)
                     .set_speed(Speed::Speed2_150MHz)
                     .set_drive_strength(DriveStrength::R0_DIV_6);
let mut peripherals = Peripherals::take().unwrap();
peripherals.iomuxc.gpio_ad_b0_00.configure(&LED_PIN_CONFIG);

Re-exports

pub use slew_rate::Values as SlewRate;
pub use drive_strength::Values as DriveStrength;
pub use speed::Values as Speed;
pub use open_drain::Values as OpenDrain;
pub use pull_up::Values as PullUp;
pub use hysterisis::Values as Hysterisis;

Modules

drive_strength

Drive strength mask, offset, and possible values

hysterisis

Hysterisis mask, offset, and possible values

open_drain

Open drain mask, offset, and possible values

pull_up

Pull up/down, keeper options

slew_rate

Slew rate mask, offset, and possible values

speed

Speed mask, offset, and possible values

Structs

PinConfig

Pin Config