pub struct SpiInner<SPI, W> { /* private fields */ }
Implementations§
Source§impl<SPI: Instance, W> SpiInner<SPI, W>
impl<SPI: Instance, W> SpiInner<SPI, W>
Sourcepub fn bit_format(&mut self, format: SpiBitFormat)
pub fn bit_format(&mut self, format: SpiBitFormat)
Select which frame format is used for data transfers
Sourcepub fn listen(&mut self, event: Event)
pub fn listen(&mut self, event: Event)
Starts listening to the SPI by enabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt
Sourcepub fn unlisten(&mut self, event: Event)
pub fn unlisten(&mut self, event: Event)
Stops listening to the SPI by disabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt
Sourcepub fn is_tx_empty(&self) -> bool
pub fn is_tx_empty(&self) -> bool
Returns true if the tx register is empty (and can accept data)
Sourcepub fn is_rx_not_empty(&self) -> bool
pub fn is_rx_not_empty(&self) -> bool
Returns true if the rx register is not empty (and can be read)
Sourcepub fn is_overrun(&self) -> bool
pub fn is_overrun(&self) -> bool
Returns true if data are received and the previous data have not yet been read from SPI_DR.
Source§impl<SPI, W> SpiInner<SPI, W>
impl<SPI, W> SpiInner<SPI, W>
pub fn read_nonblocking(&mut self) -> Result<W, Error>
pub fn write_nonblocking(&mut self, data: W) -> Result<(), Error>
pub fn write(&mut self, words: &[W]) -> Result<(), Error>
pub fn transfer_in_place(&mut self, words: &mut [W]) -> Result<(), Error>
pub fn transfer(&mut self, buff: &mut [W], data: &[W]) -> Result<(), Error>
pub fn flush(&mut self) -> Result<(), Error>
pub fn read(&mut self, words: &mut [W]) -> Result<(), Error>
Auto Trait Implementations§
impl<SPI, W> Freeze for SpiInner<SPI, W>where
SPI: Freeze,
impl<SPI, W> RefUnwindSafe for SpiInner<SPI, W>where
SPI: RefUnwindSafe,
W: RefUnwindSafe,
impl<SPI, W> Send for SpiInner<SPI, W>
impl<SPI, W> Sync for SpiInner<SPI, W>
impl<SPI, W> Unpin for SpiInner<SPI, W>
impl<SPI, W> UnwindSafe for SpiInner<SPI, W>where
SPI: UnwindSafe,
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more