pub struct UartDebugWriter { /* private fields */ }Expand description
Buffered DebugWriter implementation using a UART.
Currently used as a default implementation of DebugWriterComponent.
Implementations§
Source§impl UartDebugWriter
impl UartDebugWriter
pub fn new( uart: &'static dyn Transmit<'_>, out_buffer: &'static mut [u8], internal_buffer: &'static mut RingBuffer<'static, u8>, ) -> UartDebugWriter
Trait Implementations§
Source§impl DebugWriter for UartDebugWriter
impl DebugWriter for UartDebugWriter
Source§fn write(&self, bytes: &[u8], overflow_message: &[u8]) -> usize
fn write(&self, bytes: &[u8], overflow_message: &[u8]) -> usize
Write bytes to output with overflow notification. Read more
Source§fn flush(&self, writer: &mut dyn IoWrite)
fn flush(&self, writer: &mut dyn IoWrite)
Flush any buffered bytes to the provided output writer. Read more
Source§fn available_len(&self) -> usize
fn available_len(&self) -> usize
Available length of the internal buffer if limited. Read more
Source§fn to_write_len(&self) -> usize
fn to_write_len(&self) -> usize
How many bytes are buffered and not yet written.
Source§impl IoWrite for UartDebugWriter
impl IoWrite for UartDebugWriter
Source§impl TransmitClient for UartDebugWriter
impl TransmitClient for UartDebugWriter
Source§fn transmitted_buffer(
&self,
buffer: &'static mut [u8],
_tx_len: usize,
_rcode: Result<(), ErrorCode>,
)
fn transmitted_buffer( &self, buffer: &'static mut [u8], _tx_len: usize, _rcode: Result<(), ErrorCode>, )
A call to
Transmit::transmit_buffer completed. Read moreSource§fn transmitted_word(&self, _rcode: Result<(), ErrorCode>)
fn transmitted_word(&self, _rcode: Result<(), ErrorCode>)
A call to
Transmit::transmit_word completed. Read moreAuto Trait Implementations§
impl !Freeze for UartDebugWriter
impl !RefUnwindSafe for UartDebugWriter
impl !Send for UartDebugWriter
impl !Sync for UartDebugWriter
impl Unpin for UartDebugWriter
impl !UnwindSafe for UartDebugWriter
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