[][src]Struct imxrt_iomuxc_build::ImplGpioPin

pub struct ImplGpioPin(_);

A type that describes how to impl gpio::Pin for a series of pads

The following usage

use imxrt_iomuxc_build as build;
use build::{ImplGpioPin, GpioRange, PadRange};

let ad_b0 = PadRange::new("AD_B0", 0..4);
// States that the four AD_B0 pads are driven by GPIO3_IO8 through GPIO03_IO12
ImplGpioPin::from_range(&ad_b0, GpioRange {
    module: 3,
    offset: 8,
    alt: 5,
});

will, when paired with write_impl_gpio_pins(), generate Rust code that resembles

This example is not tested
impl crate::gpio::Pin for ad_b0::AD_B0_00 {
    const ALT: u32 = 5;
    type Module = U3;
    type Offset = U8;
}

impl crate::gpio::Pin for ad_b0::AD_B0_01 {
    const ALT: u32 = 5;
    type Module = U3;
    type Offset = U9;
}

impl crate::gpio::Pin for ad_b0::AD_B0_02 {
    const ALT: u32 = 5;
    type Module = U3;
    type Offset = U11;
}

impl crate::gpio::Pin for ad_b0::AD_B0_03 {
    const ALT: u32 = 5;
    type Module = U3;
    type Offset = U11;
}

Implementations

impl ImplGpioPin[src]

pub fn from_range(range: &PadRange, gpio: GpioRange) -> Self[src]

Define a GPIO implementation from a range that describes the GPIO pattern

Trait Implementations

impl Debug for ImplGpioPin[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.