pub struct LpuartRx<'a, M: Mode> { /* private fields */ }Expand description
Lpuart Rx driver.
Implementations§
Source§impl<'a> LpuartRx<'a, Blocking>
impl<'a> LpuartRx<'a, Blocking>
Sourcepub fn new_blocking<T: Instance>(
_inner: Peri<'a, T>,
rx_pin: Peri<'a, impl RxPin<T>>,
config: Config,
) -> Result<Self>
pub fn new_blocking<T: Instance>( _inner: Peri<'a, T>, rx_pin: Peri<'a, impl RxPin<T>>, config: Config, ) -> Result<Self>
Create a new blocking LPUART Receiver instance
Sourcepub fn new_blocking_with_rts<T: Instance>(
_inner: Peri<'a, T>,
rx_pin: Peri<'a, impl RxPin<T>>,
rts_pin: Peri<'a, impl RtsPin<T>>,
config: Config,
) -> Result<Self>
pub fn new_blocking_with_rts<T: Instance>( _inner: Peri<'a, T>, rx_pin: Peri<'a, impl RxPin<T>>, rts_pin: Peri<'a, impl RtsPin<T>>, config: Config, ) -> Result<Self>
Create a new blocking LPUART Receiver instance with RTS flow control
Sourcepub fn read(&mut self, buf: &mut [u8]) -> Result<()>
pub fn read(&mut self, buf: &mut [u8]) -> Result<()>
Read data from LPUART RX without 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.
Trait Implementations§
Source§impl Read for LpuartRx<'_, Blocking>
impl Read for LpuartRx<'_, 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 moreAuto Trait Implementations§
impl<'a, M> Freeze for LpuartRx<'a, M>
impl<'a, M> !RefUnwindSafe for LpuartRx<'a, M>
impl<'a, M> !Send for LpuartRx<'a, M>
impl<'a, M> !Sync for LpuartRx<'a, M>
impl<'a, M> Unpin for LpuartRx<'a, M>where
M: Unpin,
impl<'a, M> !UnwindSafe for LpuartRx<'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