[−][src]Struct atsamd21_hal::sercom::SPIMaster0
SPIMasterX represents the corresponding SERCOMX instance configured to
act in the role of an SPI Master.
Objects of this type implement the HAL FullDuplex
and blocking SPI
traits.
Methods
impl SPIMaster0
[src]
pub fn new<F: Into<Hertz>>(
clock: &Sercom0CoreClock,
freq: F,
mode: Mode,
sercom: SERCOM0,
pm: &mut PM,
pinout: SPI0Pinout
) -> Self
[src]
clock: &Sercom0CoreClock,
freq: F,
mode: Mode,
sercom: SERCOM0,
pm: &mut PM,
pinout: SPI0Pinout
) -> Self
Power on and configure SERCOMX to work as an SPI Master operating with the specified frequency and SPI Mode. The pinout specifies which pins are bound to the MISO, MOSI, SCK functions.
pub fn free(self) -> (SPI0Pinout, SERCOM0)
[src]
Tear down the SPI instance and yield the constituent pins and SERCOM instance. No explicit de-initialization is performed.
Trait Implementations
impl Default<u8> for SPIMaster0
[src]
impl Default<u8> for SPIMaster0
[src]
impl FullDuplex<u8> for SPIMaster0
[src]
Auto Trait Implementations
impl Send for SPIMaster0
impl !Sync for SPIMaster0
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<W, S> Transfer for S where
S: Default<W>,
W: Clone,
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type
fn transfer(
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
&mut self,
words: &'w mut [W]
) -> Result<&'w [W], <S as FullDuplex<W>>::Error>
impl<W, S> Write for S where
S: Default<W>,
W: Clone,
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type