Struct sodaq_sara_aff::sercom::v2::uart::Pads

source ·
pub struct Pads<S, RX = NoneT, TX = NoneT, RTS = NoneT, CTS = NoneT>where
    S: Sercom,
    RX: OptionalPad,
    TX: OptionalPad,
    RTS: OptionalPad,
    CTS: OptionalPad,{ /* private fields */ }
Expand description

Container for a set of SERCOM Pads

See the module-level documentation for more details on specifying a Pads type and creating instances.

Implementations§

source§

impl<S, RX, TX, RTS, CTS> Pads<S, RX, TX, RTS, CTS>where S: Sercom, RX: OptionalPad, TX: OptionalPad, RTS: OptionalPad, CTS: OptionalPad,

source

pub fn free(self) -> (RX, TX, RTS, CTS)

Consume the Pads and return each individual Pad

source§

impl<S, RX, TX, RTS, CTS> Pads<S, RX, TX, RTS, CTS>where S: Sercom, RX: OptionalPad, TX: OptionalPad, RTS: OptionalPad, CTS: OptionalPad,

source

pub fn rx<I>( self, pin: impl AnyPin<Id = I> ) -> Pads<S, Pin<I, <I as GetPad<S>>::PinMode>, TX, RTS, CTS>where I: GetPad<S>, Pin<I, <I as GetPad<S>>::PinMode>: IsPad,

Set the RX Pad

source

pub fn tx<I>( self, pin: impl AnyPin<Id = I> ) -> Pads<S, RX, Pin<I, <I as GetPad<S>>::PinMode>, RTS, CTS>where I: GetPad<S>, Pin<I, <I as GetPad<S>>::PinMode>: IsPad,

Set the TX Pad

source

pub fn rts<I>( self, pin: impl AnyPin<Id = I> ) -> Pads<S, RX, TX, Pin<I, <I as GetPad<S>>::PinMode>, CTS>where I: GetPad<S>, Pin<I, <I as GetPad<S>>::PinMode>: IsPad,

Set the RTS Pad

source

pub fn cts<I>( self, pin: impl AnyPin<Id = I> ) -> Pads<S, RX, TX, RTS, Pin<I, <I as GetPad<S>>::PinMode>>where I: GetPad<S>, Pin<I, <I as GetPad<S>>::PinMode>: IsPad,

Set the CTS Pad

Trait Implementations§

source§

impl<S> Default for Pads<S, NoneT, NoneT, NoneT, NoneT>where S: Sercom,

source§

fn default() -> Pads<S, NoneT, NoneT, NoneT, NoneT>

Returns the “default value” for a type. Read more
source§

impl<S, RX, TX, RTS, CTS> PadSet for Pads<S, RX, TX, RTS, CTS>where S: Sercom, RX: OptionalPad, TX: OptionalPad, RTS: OptionalPad, CTS: OptionalPad,

§

type Sercom = S

§

type Rx = RX

§

type Tx = TX

§

type Rts = RTS

§

type Cts = CTS

source§

impl<S, RX, TX, RTS, CTS> RxpoTxpo for Pads<S, RX, TX, RTS, CTS>where S: Sercom, RX: OptionalPad, TX: OptionalPad, RTS: OptionalPad, CTS: OptionalPad, (<RX as OptionalPad>::PadNum, <TX as OptionalPad>::PadNum, <RTS as OptionalPad>::PadNum, <CTS as OptionalPad>::PadNum): RxpoTxpo,

Lift the implementations of RxpoTxpo from four-tuples of OptionalPadNums to the corresponding Pads types.

source§

const RXPO: u8 = <(RX::PadNum, TX::PadNum, RTS::PadNum, CTS::PadNum)>::RXPO

RXPO field value
source§

const TXPO: u8 = <(RX::PadNum, TX::PadNum, RTS::PadNum, CTS::PadNum)>::TXPO

RXPO field value
source§

impl<S, TX, CTS> ValidPads for Pads<S, NoneT, TX, NoneT, CTS>where S: Sercom, TX: SomePad, CTS: OptionalPad, Pads<S, NoneT, TX, NoneT, CTS>: PadSet + RxpoTxpo,

source§

impl<S, RX, RTS> ValidPads for Pads<S, RX, NoneT, RTS, NoneT>where S: Sercom, RX: SomePad, RTS: OptionalPad, Pads<S, RX, NoneT, RTS, NoneT>: PadSet + RxpoTxpo,

source§

impl<S, RX, TX, RTS, CTS> ValidPads for Pads<S, RX, TX, RTS, CTS>where S: Sercom, RX: SomePad, TX: SomePad, RTS: OptionalPad, CTS: OptionalPad, Pads<S, RX, TX, RTS, CTS>: PadSet + RxpoTxpo,

Auto Trait Implementations§

§

impl<S, RX, TX, RTS, CTS> RefUnwindSafe for Pads<S, RX, TX, RTS, CTS>where CTS: RefUnwindSafe, RTS: RefUnwindSafe, RX: RefUnwindSafe, S: RefUnwindSafe, TX: RefUnwindSafe,

§

impl<S, RX, TX, RTS, CTS> Send for Pads<S, RX, TX, RTS, CTS>where CTS: Send, RTS: Send, RX: Send, S: Send, TX: Send,

§

impl<S, RX, TX, RTS, CTS> Sync for Pads<S, RX, TX, RTS, CTS>where CTS: Sync, RTS: Sync, RX: Sync, S: Sync, TX: Sync,

§

impl<S, RX, TX, RTS, CTS> Unpin for Pads<S, RX, TX, RTS, CTS>where CTS: Unpin, RTS: Unpin, RX: Unpin, S: Unpin, TX: Unpin,

§

impl<S, RX, TX, RTS, CTS> UnwindSafe for Pads<S, RX, TX, RTS, CTS>where CTS: UnwindSafe, RTS: UnwindSafe, RX: UnwindSafe, S: UnwindSafe, TX: 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.