pub struct Lpuart<'a, M: Mode> { /* private fields */ }Expand description
Lpuart driver.
Implementations§
Source§impl<'a, M: Mode> Lpuart<'a, M>
impl<'a, M: Mode> Lpuart<'a, M>
Source§impl<'a> Lpuart<'a, Blocking>
impl<'a> Lpuart<'a, Blocking>
Sourcepub fn new_blocking<T: Instance>(
_inner: Peri<'a, T>,
tx_pin: Peri<'a, impl TxPin<T>>,
rx_pin: Peri<'a, impl RxPin<T>>,
config: Config,
) -> Result<Self>
pub fn new_blocking<T: Instance>( _inner: Peri<'a, T>, tx_pin: Peri<'a, impl TxPin<T>>, rx_pin: Peri<'a, impl RxPin<T>>, config: Config, ) -> Result<Self>
Create a new blocking LPUART instance with RX/TX pins.
Sourcepub fn new_blocking_with_rtscts<T: Instance>(
_inner: Peri<'a, T>,
tx_pin: Peri<'a, impl TxPin<T>>,
rx_pin: Peri<'a, impl RxPin<T>>,
cts_pin: Peri<'a, impl CtsPin<T>>,
rts_pin: Peri<'a, impl RtsPin<T>>,
config: Config,
) -> Result<Self>
pub fn new_blocking_with_rtscts<T: Instance>( _inner: Peri<'a, T>, tx_pin: Peri<'a, impl TxPin<T>>, rx_pin: Peri<'a, impl RxPin<T>>, cts_pin: Peri<'a, impl CtsPin<T>>, rts_pin: Peri<'a, impl RtsPin<T>>, config: Config, ) -> Result<Self>
Create a new blocking LPUART instance with RX, TX and RTS/CTS flow control pins
Source§impl<'a> Lpuart<'a, Blocking>
impl<'a> Lpuart<'a, Blocking>
Sourcepub fn blocking_read(&mut self, buf: &mut [u8]) -> Result<()>
pub fn blocking_read(&mut self, buf: &mut [u8]) -> Result<()>
Read data from LPUART RX blocking execution until the buffer is filled
Sourcepub fn blocking_write(&mut self, buf: &[u8]) -> Result<()>
pub fn blocking_write(&mut self, buf: &[u8]) -> Result<()>
Write data to LPUART TX blocking execution until all data is sent
pub fn write_byte(&mut self, byte: u8) -> Result<()>
pub fn read_byte_blocking(&mut self) -> u8
pub fn write_str_blocking(&mut self, buf: &str)
Sourcepub fn blocking_flush(&mut self) -> Result<()>
pub fn blocking_flush(&mut self) -> Result<()>
Flush LPUART TX blocking execution until all data has been transmitted
Trait Implementations§
Source§impl Read for Lpuart<'_, Blocking>
impl Read for Lpuart<'_, Blocking>
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 Write for Lpuart<'_, Blocking>
impl Write for Lpuart<'_, Blocking>
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.
Source§impl Write<u8> for Lpuart<'_, Blocking>
impl Write<u8> for Lpuart<'_, Blocking>
Auto Trait Implementations§
impl<'a, M> Freeze for Lpuart<'a, M>
impl<'a, M> !RefUnwindSafe for Lpuart<'a, M>
impl<'a, M> !Send for Lpuart<'a, M>
impl<'a, M> !Sync for Lpuart<'a, M>
impl<'a, M> Unpin for Lpuart<'a, M>where
M: Unpin,
impl<'a, M> !UnwindSafe for Lpuart<'a, M>
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