pub struct LpUart { /* private fields */ }
Expand description
LP-UART driver
Implementations§
Source§impl LpUart
impl LpUart
Sourcepub fn read_byte(&mut self) -> Result<u8, Error>
pub fn read_byte(&mut self) -> Result<u8, Error>
Read a single byte from the UART in a non-blocking manner.
Sourcepub fn write_byte(&mut self, byte: u8) -> Result<(), Error>
pub fn write_byte(&mut self, byte: u8) -> Result<(), Error>
Write a single byte to the UART in a non-blocking manner.
Sourcepub fn write_bytes(&mut self, data: &[u8]) -> Result<usize, Error>
pub fn write_bytes(&mut self, data: &[u8]) -> Result<usize, Error>
Write one or more byte to the UART, blocking until the write has completed.
Trait Implementations§
Source§impl Read for LpUart
impl Read for LpUart
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl ReadReady for LpUart
impl ReadReady for LpUart
Source§fn read_ready(&mut self) -> Result<bool, Self::Error>
fn read_ready(&mut self) -> Result<bool, Self::Error>
Get whether the reader is ready for immediately reading. Read more
Source§impl Write for LpUart
impl Write for LpUart
Source§impl Write for LpUart
impl Write for LpUart
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.