atsamd_hal::sercom::spi::pads

Struct Pads

Source
pub struct Pads<S, DI = NoneT, DO = NoneT, CK = NoneT, SS = NoneT>
where S: Sercom, DI: OptionalPad, DO: OptionalPad, CK: OptionalPad, SS: OptionalPad,
{ /* private fields */ }
Expand description

Container for a set of SERCOM pads

See the module-level documentation for more details on declaring and instantiating Pads types.

Implementations§

Source§

impl<S, DI, DO, CK, SS> Pads<S, DI, DO, CK, SS>
where S: Sercom, DI: OptionalPad, DO: OptionalPad, CK: OptionalPad, SS: OptionalPad,

Source

pub fn free(self) -> (DI, DO, CK, SS)

Consume the Pads and return each individual Pin

Source§

impl<S, DI, DO, CK, SS> Pads<S, DI, DO, CK, SS>
where S: Sercom, DI: OptionalPad, DO: OptionalPad, CK: OptionalPad, SS: OptionalPad,

Source

pub fn data_in<P: IsPad>(self, pin: P) -> Pads<S, P, DO, CK, SS>

Set the DI pad

In a MasterMode, this is MISO. In Slave OpMode, this is MOSI.

Source

pub fn data_out<P: IsPad>(self, pin: P) -> Pads<S, DI, P, CK, SS>

Set the DO pad

In a MasterMode, this is MOSI. In Slave OpMode, this is MISO.

Source

pub fn sclk<P: IsPad>(self, pin: P) -> Pads<S, DI, DO, P, SS>

Set the SCK pad

Source

pub fn ss<P: IsPad>(self, pin: P) -> Pads<S, DI, DO, CK, P>

Set the SS 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, DI, DO, CK, SS> DipoDopo for Pads<S, DI, DO, CK, SS>
where S: Sercom, DI: OptionalPad, DO: OptionalPad, CK: OptionalPad, SS: OptionalPad, (DI::PadNum, DO::PadNum, CK::PadNum, SS::PadNum): DipoDopo,

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

Source§

const DIPO_DOPO: (u8, u8) = <(DI::PadNum, DO::PadNum, CK::PadNum, SS::PadNum)>::DIPO_DOPO

Source§

impl<S, DI, DO, CK, SS> PadSet for Pads<S, DI, DO, CK, SS>
where S: Sercom, DI: OptionalPad, DO: OptionalPad, CK: OptionalPad, SS: OptionalPad,

Source§

type Sercom = S

Source§

type DataIn = DI

Source§

type DataOut = DO

Source§

type Sclk = CK

Source§

type SS = SS

Source§

impl<S, DI, DO, CK, SS> ValidPads for Pads<S, DI, DO, CK, SS>
where S: Sercom, DI: SomePad, DO: SomePad, CK: SomePad, SS: OptionalPad, Pads<S, DI, DO, CK, SS>: DipoDopo,

Source§

impl<S, DI, CK, SS> ValidPads for Pads<S, DI, NoneT, CK, SS>
where S: Sercom, DI: SomePad, CK: SomePad, SS: OptionalPad, Pads<S, DI, NoneT, CK, SS>: DipoDopo,

Source§

impl<S, DO, CK, SS> ValidPads for Pads<S, NoneT, DO, CK, SS>
where S: Sercom, DO: SomePad, CK: SomePad, SS: OptionalPad, Pads<S, NoneT, DO, CK, SS>: DipoDopo,

Auto Trait Implementations§

§

impl<S, DI, DO, CK, SS> Freeze for Pads<S, DI, DO, CK, SS>
where DI: Freeze, DO: Freeze, CK: Freeze, SS: Freeze,

§

impl<S, DI, DO, CK, SS> RefUnwindSafe for Pads<S, DI, DO, CK, SS>

§

impl<S, DI, DO, CK, SS> Send for Pads<S, DI, DO, CK, SS>
where DI: Send, DO: Send, CK: Send, SS: Send, S: Send,

§

impl<S, DI, DO, CK, SS> Sync for Pads<S, DI, DO, CK, SS>
where DI: Sync, DO: Sync, CK: Sync, SS: Sync, S: Sync,

§

impl<S, DI, DO, CK, SS> Unpin for Pads<S, DI, DO, CK, SS>
where DI: Unpin, DO: Unpin, CK: Unpin, SS: Unpin, S: Unpin,

§

impl<S, DI, DO, CK, SS> UnwindSafe for Pads<S, DI, DO, CK, SS>
where DI: UnwindSafe, DO: UnwindSafe, CK: UnwindSafe, SS: 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.