pub struct UarteRxWithIdle<'d> { /* private fields */ }Expand description
Receiver part of the UARTE driver, with read_until_idle support.
This can be obtained via Uarte::split_with_idle.
Implementations§
Source§impl<'d> UarteRxWithIdle<'d>
impl<'d> UarteRxWithIdle<'d>
Sourcepub async fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
pub async fn read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
Read bytes until the buffer is filled.
Sourcepub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
pub fn blocking_read(&mut self, buffer: &mut [u8]) -> Result<(), Error>
Read bytes until the buffer is filled.
Sourcepub async fn stop_rx(&mut self)
pub async fn stop_rx(&mut self)
Stop the receiver.
This function waits for the receiver to stop (as indicated by a RXTO event).
Note that the receiver may still receive up to 4 bytes while being stopped.
You can use Self::flush_rx() to remove the data from the internal RX FIFO
without re-activating the receiver.
Sourcepub fn blocking_stop_rx(&mut self)
pub fn blocking_stop_rx(&mut self)
Stop the receiver.
This function waits for the receiver to stop (as indicated by a RXTO event).
Note that the receiver may still receive up to 4 bytes while being stopped.
You can use Self::blocking_flush_rx() to remove the data from the internal RX FIFO
without re-activating the receiver.
Sourcepub async fn flush_rx(&mut self, buffer: &mut [u8]) -> Result<usize, Error>
pub async fn flush_rx(&mut self, buffer: &mut [u8]) -> Result<usize, Error>
Flush the RX FIFO to RAM without activating the receiver.
Sourcepub fn blocking_flush_rx(&mut self, buffer: &mut [u8]) -> Result<usize, Error>
pub fn blocking_flush_rx(&mut self, buffer: &mut [u8]) -> Result<usize, Error>
Flush the RX FIFO to RAM without activating the receiver.