pub struct Pads<S, I, DI = NoneT, DO = NoneT, CK = NoneT, SS = NoneT>{ /* private fields */ }
Expand description
Container for a set of SERCOM pads
See the spi module documentation for more details on declaring and
instantiating a Pads
type.
Implementations§
Source§impl<S, I, DI, DO, CK, SS> Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> Pads<S, I, DI, DO, CK, SS>
Sourcepub fn data_in<Id>(
self,
pin: impl AnyPin<Id = Id>,
) -> Pads<S, I, Pad<S, Id>, DO, CK, SS>
pub fn data_in<Id>( self, pin: impl AnyPin<Id = Id>, ) -> Pads<S, I, Pad<S, Id>, DO, CK, SS>
Set the DI
pad
In a MasterMode
, this is MISO. In Slave
OpMode
, this is
MOSI.
Sourcepub fn data_out<Id>(
self,
pin: impl AnyPin<Id = Id>,
) -> Pads<S, I, DI, Pad<S, Id>, CK, SS>
pub fn data_out<Id>( self, pin: impl AnyPin<Id = Id>, ) -> Pads<S, I, DI, Pad<S, Id>, CK, SS>
Set the DO
pad
In a MasterMode
, this is MOSI. In Slave
OpMode
, this is
MISO.
Sourcepub fn sclk<Id>(
self,
pin: impl AnyPin<Id = Id>,
) -> Pads<S, I, DI, DO, Pad<S, Id>, SS>
pub fn sclk<Id>( self, pin: impl AnyPin<Id = Id>, ) -> Pads<S, I, DI, DO, Pad<S, Id>, SS>
Set the SCK
pad, which is always Pad1
Sourcepub fn ss<Id>(
self,
pin: impl AnyPin<Id = Id>,
) -> Pads<S, I, DI, DO, CK, Pad<S, Id>>
pub fn ss<Id>( self, pin: impl AnyPin<Id = Id>, ) -> Pads<S, I, DI, DO, CK, Pad<S, Id>>
Set the SS
pad, which is always Pad2
Sourcepub fn free(self) -> (DI, DO, CK, SS)
pub fn free(self) -> (DI, DO, CK, SS)
Trait Implementations§
Source§impl<S, I, DI, DO, CK, SS> DipoDopo for Pads<S, I, DI, DO, CK, SS>where
S: Sercom,
I: IoSet,
DI: OptionalPad,
DO: OptionalPad,
CK: OptionalPad,
SS: OptionalPad,
DI::PadNum: Dipo,
DO::PadNum: Dopo,
Lift the implementations of DipoDopo
from implementations on
OptionalPadNum
s to the corresponding Pads
types.
impl<S, I, DI, DO, CK, SS> DipoDopo for Pads<S, I, DI, DO, CK, SS>where
S: Sercom,
I: IoSet,
DI: OptionalPad,
DO: OptionalPad,
CK: OptionalPad,
SS: OptionalPad,
DI::PadNum: Dipo,
DO::PadNum: Dopo,
Lift the implementations of DipoDopo
from implementations on
OptionalPadNum
s to the corresponding Pads
types.
Source§impl<S, I, DI, DO, CK, SS> ValidPads for Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> ValidPads for Pads<S, I, DI, DO, CK, SS>
type Capability = Duplex
Auto Trait Implementations§
impl<S, I, DI, DO, CK, SS> Freeze for Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> RefUnwindSafe for Pads<S, I, DI, DO, CK, SS>where
DI: RefUnwindSafe,
DO: RefUnwindSafe,
CK: RefUnwindSafe,
SS: RefUnwindSafe,
S: RefUnwindSafe,
I: RefUnwindSafe,
impl<S, I, DI, DO, CK, SS> Send for Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> Sync for Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> Unpin for Pads<S, I, DI, DO, CK, SS>
impl<S, I, DI, DO, CK, SS> UnwindSafe for Pads<S, I, DI, DO, CK, SS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more