pub struct LpuartBbq { /* private fields */ }Expand description
A bbqueue powered buffered Lpuart
Implementations§
Source§impl LpuartBbq
impl LpuartBbq
Sourcepub fn new(
parts: BbqParts,
config: BbqConfig,
mode: BbqRxMode,
) -> Result<Self, BbqError>
pub fn new( parts: BbqParts, config: BbqConfig, mode: BbqRxMode, ) -> Result<Self, BbqError>
Create a new LpuartBbq with both transmit and receive halves
Sourcepub fn write(
&mut self,
buf: &[u8],
) -> impl Future<Output = Result<usize, BbqError>>
pub fn write( &mut self, buf: &[u8], ) -> impl Future<Output = Result<usize, BbqError>>
Write some data to the buffer. See LpuartBbqTx::write for more information
Sourcepub fn read(
&mut self,
buf: &mut [u8],
) -> impl Future<Output = Result<usize, BbqError>>
pub fn read( &mut self, buf: &mut [u8], ) -> impl Future<Output = Result<usize, BbqError>>
Read some data from the buffer. See LpuartBbqRx::read for more information
Sourcepub fn flush(&mut self) -> impl Future<Output = ()>
pub fn flush(&mut self) -> impl Future<Output = ()>
Wait for all bytes in the outgoing buffer to be flushed asynchronously.
See LpuartBbqTx::flush for more information
Sourcepub fn blocking_flush(&mut self)
pub fn blocking_flush(&mut self)
Busy wait until all transmitting has completed
See LpuartBbqTx::blocking_flush for more information
Auto Trait Implementations§
impl Freeze for LpuartBbq
impl !RefUnwindSafe for LpuartBbq
impl Send for LpuartBbq
impl Sync for LpuartBbq
impl Unpin for LpuartBbq
impl !UnwindSafe for LpuartBbq
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