[−][src]Struct e310x_hal::spi::Spi
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]
spi: QSPI0,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Self where
PINS: Pins<QSPI0>,
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]
spi: QSPI1,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Self where
PINS: Pins<QSPI1>,
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]
spi: QSPI2,
pins: PINS,
mode: Mode,
freq: Hertz,
clocks: Clocks
) -> Self where
PINS: Pins<QSPI2>,
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
fn read(&mut self) -> Result<u8, Void>
[src]
fn send(&mut self, byte: u8) -> Result<(), Void>
[src]
impl<PINS> FullDuplex<u8> for Spi<QSPI1, PINS>
[src]
type Error = Void
An enumeration of SPI errors
fn read(&mut self) -> Result<u8, Void>
[src]
fn send(&mut self, byte: u8) -> Result<(), Void>
[src]
impl<PINS> FullDuplex<u8> for Spi<QSPI2, PINS>
[src]
Auto Trait Implementations
impl<SPI, PINS> Send for Spi<SPI, PINS> where
PINS: Send,
SPI: Send,
PINS: Send,
SPI: Send,
impl<SPI, PINS> Sync for Spi<SPI, PINS> where
PINS: Sync,
SPI: Sync,
PINS: Sync,
SPI: Sync,
Blanket Implementations
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> From for T
[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,
[src]
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>
[src]
&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,
[src]
S: Default<W>,
W: Clone,
type Error = <S as FullDuplex<W>>::Error
Error type