[−][src]Struct imxrt_iomuxc_build::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
Auto Trait Implementations
impl RefUnwindSafe for ImplGpioPin
impl Send for ImplGpioPin
impl Sync for ImplGpioPin
impl Unpin for ImplGpioPin
impl UnwindSafe for ImplGpioPin
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,