atsamd_hal::sercom::uart

Struct 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, Pad<S, I>, TX, RTS, CTS>
where I: GetPad<S>, Pad<S, I>: IsPad,

Set the RX Pad

Source

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

Set the TX Pad

Source

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

Set the RTS Pad

Source

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

Set the CTS Pad

Trait Implementations§

Source§

impl<S: Sercom> Default for Pads<S>

Source§

fn default() -> Self

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,

Source§

type Sercom = S

Source§

type Rx = RX

Source§

type Tx = TX

Source§

type Rts = RTS

Source§

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::PadNum, TX::PadNum, RTS::PadNum, CTS::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, Self: PadSet + RxpoTxpo,

Source§

impl<S, RX, RTS> ValidPads for Pads<S, RX, NoneT, RTS, NoneT>
where S: Sercom, RX: SomePad, RTS: OptionalPad, Self: 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, Self: PadSet + RxpoTxpo,

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.