[][src]Struct e310x_hal::spi::Spi

pub struct Spi<SPI, PINS> { /* fields omitted */ }

SPI abstraction

Methods

impl<PINS> Spi<QSPI0, PINS>[src]

pub fn spi0(
    spi: QSPI0,
    pins: PINS,
    mode: Mode,
    freq: Hertz,
    clocks: Clocks
) -> Self where
    PINS: Pins<QSPI0>, 
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn set_tx_watermark(&mut self, value: u8)[src]

Sets transmit watermark level

pub fn set_rx_watermark(&mut self, value: u8)[src]

Sets receive watermark level

pub fn tx_wm_is_pending(&self) -> bool[src]

Returns transmit watermark event status

pub fn rx_wm_is_pending(&self) -> bool[src]

Returns receive watermark event status

pub fn listen_tx_wm(&mut self)[src]

Starts listening for transmit watermark interrupt event

pub fn listen_rx_wm(&mut self)[src]

Starts listening for receive watermark interrupt event

pub fn unlisten_tx_wm(&mut self)[src]

Stops listening for transmit watermark interrupt event

pub fn unlisten_rx_wm(&mut self)[src]

Stops listening for receive watermark interrupt event

pub fn free(self) -> (QSPI0, PINS)[src]

Releases the SPI peripheral and associated pins

impl<PINS> Spi<QSPI1, PINS>[src]

pub fn spi1(
    spi: QSPI1,
    pins: PINS,
    mode: Mode,
    freq: Hertz,
    clocks: Clocks
) -> Self where
    PINS: Pins<QSPI1>, 
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn set_tx_watermark(&mut self, value: u8)[src]

Sets transmit watermark level

pub fn set_rx_watermark(&mut self, value: u8)[src]

Sets receive watermark level

pub fn tx_wm_is_pending(&self) -> bool[src]

Returns transmit watermark event status

pub fn rx_wm_is_pending(&self) -> bool[src]

Returns receive watermark event status

pub fn listen_tx_wm(&mut self)[src]

Starts listening for transmit watermark interrupt event

pub fn listen_rx_wm(&mut self)[src]

Starts listening for receive watermark interrupt event

pub fn unlisten_tx_wm(&mut self)[src]

Stops listening for transmit watermark interrupt event

pub fn unlisten_rx_wm(&mut self)[src]

Stops listening for receive watermark interrupt event

pub fn free(self) -> (QSPI1, PINS)[src]

Releases the SPI peripheral and associated pins

impl<PINS> Spi<QSPI2, PINS>[src]

pub fn spi2(
    spi: QSPI2,
    pins: PINS,
    mode: Mode,
    freq: Hertz,
    clocks: Clocks
) -> Self where
    PINS: Pins<QSPI2>, 
[src]

Configures the SPI peripheral to operate in full duplex master mode

pub fn set_tx_watermark(&mut self, value: u8)[src]

Sets transmit watermark level

pub fn set_rx_watermark(&mut self, value: u8)[src]

Sets receive watermark level

pub fn tx_wm_is_pending(&self) -> bool[src]

Returns transmit watermark event status

pub fn rx_wm_is_pending(&self) -> bool[src]

Returns receive watermark event status

pub fn listen_tx_wm(&mut self)[src]

Starts listening for transmit watermark interrupt event

pub fn listen_rx_wm(&mut self)[src]

Starts listening for receive watermark interrupt event

pub fn unlisten_tx_wm(&mut self)[src]

Stops listening for transmit watermark interrupt event

pub fn unlisten_rx_wm(&mut self)[src]

Stops listening for receive watermark interrupt event

pub fn free(self) -> (QSPI2, PINS)[src]

Releases the SPI peripheral and associated pins

Trait Implementations

impl<PINS> Default<u8> for Spi<QSPI0, PINS>[src]

impl<PINS> Default<u8> for Spi<QSPI1, PINS>[src]

impl<PINS> Default<u8> for Spi<QSPI2, PINS>[src]

impl<PINS> Default<u8> for Spi<QSPI0, PINS>[src]

impl<PINS> Default<u8> for Spi<QSPI1, PINS>[src]

impl<PINS> Default<u8> for Spi<QSPI2, PINS>[src]

impl<PINS> FullDuplex<u8> for Spi<QSPI0, PINS>[src]

type Error = Void

An enumeration of SPI errors

impl<PINS> FullDuplex<u8> for Spi<QSPI1, PINS>[src]

type Error = Void

An enumeration of SPI errors

impl<PINS> FullDuplex<u8> for Spi<QSPI2, PINS>[src]

type Error = Void

An enumeration of SPI errors

Auto Trait Implementations

impl<SPI, PINS> Send for Spi<SPI, PINS> where
    PINS: Send,
    SPI: Send

impl<SPI, PINS> Sync for Spi<SPI, PINS> where
    PINS: Sync,
    SPI: Sync

Blanket Implementations

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> From for T[src]

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> Transfer for S where
    S: Default<W>,
    W: Clone
[src]

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

Error type

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

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

Error type