Struct sodaq_sara_aff::sercom::Pad

source ·
pub struct Pad<S, N, P>where
    S: Sercom,
    N: PadNum,
    P: IsPad<Sercom = S, PadNum = N>,{ /* private fields */ }
Expand description

A GPIO Pin configured to act as a SERCOM Pad

This type is just a wrapper around a correctly-configured Pin. The SercomXPadY types of the original, v1 API are recreated as type aliases of the form

type SercomXPadY<Z> = Pad<SercomX, PadY, Z>

Implementations§

source§

impl<S, N, P> Pad<S, N, P>where S: Sercom, N: PadNum, P: IsPad<Sercom = S, PadNum = N>,

source

pub fn free(self) -> P

Consume the Pad and recover the corresponding Pin

Trait Implementations§

source§

impl<S, N, P> CompatiblePad for Pad<S, N, P>where S: Sercom, N: PadNum, P: IsPad<Sercom = S, PadNum = N>,

§

type Sercom = S

§

type PadNum = N

source§

impl<S, N, I, M> PadPin<Pad<S, N, Pin<I, <I as GetPad<S>>::PinMode>>> for Pin<I, M>where S: Sercom, N: PadNum, I: GetPad<S>, M: PinMode, Pin<I, M>: IntoFunction<Pin<I, <I as GetPad<S>>::PinMode>>, Pin<I, <I as GetPad<S>>::PinMode>: IsPad<Sercom = S, PadNum = N>,

source§

fn into_pad( self, port: &mut Port ) -> Pad<S, N, Pin<I, <I as GetPad<S>>::PinMode>>

Auto Trait Implementations§

§

impl<S, N, P> RefUnwindSafe for Pad<S, N, P>where N: RefUnwindSafe, P: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S, N, P> Send for Pad<S, N, P>where N: Send, P: Send, S: Send,

§

impl<S, N, P> Sync for Pad<S, N, P>where N: Sync, P: Sync, S: Sync,

§

impl<S, N, P> Unpin for Pad<S, N, P>where N: Unpin, P: Unpin, S: Unpin,

§

impl<S, N, P> UnwindSafe for Pad<S, N, P>where N: UnwindSafe, P: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.