[][src]Struct imxrt1062_hal::spi::SPI

pub struct SPI<M> { /* fields omitted */ }

An SPI master

By default, the SPI master runs at 8Mhz, Use set_clock_speed to vary the SPI bus speed.

Methods

impl<M> SPI<M> where
    M: Module
[src]

pub fn enable_chip_select_0<PCS>(&mut self, pcs: PCS) where
    PCS: Pin<Module = M, Wire = PCS0> + IntoDaisy
[src]

Enables the peripheral-controlled chip select 0 (PCS0)

Using the peripheral-controlled chip select is typically more efficient, and it means that software doesn't need to cooridnate its control.

pub fn set_mode(&mut self, mode: Mode) -> Result<(), ModeError>[src]

Set the SPI mode for the peripheral

pub fn set_clock_speed(
    &mut self,
    clock_speed: ClockSpeed
) -> Result<(), ClockSpeedError>
[src]

Set the SPI master clock speed

pub fn clear_fifo(&mut self)[src]

Clear any existing data in the SPI receive or transfer FIFOs

Trait Implementations

impl<M> Default<u16> for SPI<M> where
    M: Module
[src]

impl<M> Default<u16> for SPI<M> where
    M: Module
[src]

impl<M> Default<u16> for SPI<M> where
    M: Module
[src]

impl<M> Default<u8> for SPI<M> where
    M: Module
[src]

impl<M> Default<u8> for SPI<M> where
    M: Module
[src]

impl<M> Default<u8> for SPI<M> where
    M: Module
[src]

impl<M> FullDuplex<u16> for SPI<M> where
    M: Module
[src]

type Error = Error

An enumeration of SPI errors

impl<M> FullDuplex<u8> for SPI<M> where
    M: Module
[src]

type Error = Error

An enumeration of SPI errors

Auto Trait Implementations

impl<M> !Send for SPI<M>

impl<M> !Sync for SPI<M>

impl<M> Unpin for SPI<M> where
    M: Unpin

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

Error type

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<W, S> Write<W> for S where
    S: Default<W>,
    W: Clone
[src]

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

Error type

impl<W, S> WriteIter<W> for S where
    S: Default<W>,
    W: Clone
[src]

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

Error type