[][src]Struct itsybitsy_m0::sercom::SPIMaster4

pub struct SPIMaster4 { /* fields omitted */ }

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 SPIMaster4[src]

pub fn new<F>(
    clock: &Sercom4CoreClock,
    freq: F,
    mode: Mode,
    sercom: SERCOM4,
    pm: &mut PM,
    pinout: SPI4Pinout
) -> SPIMaster4 where
    F: Into<Hertz>, 
[src]

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) -> (SPI4Pinout, SERCOM4)[src]

Tear down the SPI instance and yield the constituent pins and SERCOM instance. No explicit de-initialization is performed.

Trait Implementations

impl FullDuplex<u8> for SPIMaster4[src]

type Error = Error

An enumeration of SPI errors

impl Default<u8> for SPIMaster4[src]

impl Default<u8> for SPIMaster4[src]

Auto Trait Implementations

impl Send for SPIMaster4

impl !Sync for SPIMaster4

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<W, S> Write for S where
    S: Default<W>,
    W: Clone

type Error = <S as FullDuplex<W>>::Error

Error type

impl<W, S> Transfer for S where
    S: Default<W>,
    W: Clone

type Error = <S as FullDuplex<W>>::Error

Error type