Struct BufferedReceiver
pub struct BufferedReceiver<'d, D>where
D: Driver<'d>,{ /* private fields */ }Expand description
CDC ACM class buffered receiver.
It is a requirement of the embedded_io_async::Read trait that arbitrarily small lengths of
data can be read from the stream. The Receiver can only read full packets at a time. The
BufferedReceiver instead buffers a single packet if the caller does not read all of the data,
so that the remaining data can be returned in subsequent calls.
If you have no requirement to use the embedded_io_async::Read trait or to read a data length
less than the packet length, then it is more efficient to use the Receiver directly.
You can obtain a BufferedReceiver with Receiver::into_buffered.
Implementations§
§impl<'d, D> BufferedReceiver<'d, D>where
D: Driver<'d>,
impl<'d, D> BufferedReceiver<'d, D>where
D: Driver<'d>,
pub fn line_coding(&self) -> LineCoding
pub fn line_coding(&self) -> LineCoding
Gets the current line coding. The line coding contains information that’s mainly relevant for USB to UART serial port emulators, and can be ignored if not relevant.
pub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the USB host to enable this interface