Struct kernel::debug::DebugWriter
source · pub struct DebugWriter { /* private fields */ }
Expand description
Main type that we need an immutable reference to so we can share it with the UART provider and this debug module.
Implementations§
source§impl DebugWriter
impl DebugWriter
pub fn new( uart: &'static dyn Transmit<'_>, out_buffer: &'static mut [u8], internal_buffer: &'static mut RingBuffer<'static, u8> ) -> DebugWriter
Trait Implementations§
source§impl TransmitClient for DebugWriter
impl TransmitClient for DebugWriter
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. The Result<(), ErrorCode>
indicates whether the buffer was successfully transmitted. A call
to transmit_word
or transmit_buffer
made within this callback
SHOULD NOT return BUSY: when this callback is made the UART should
be ready to receive another call. Read moresource§fn transmitted_word(&self, _rcode: Result<(), ErrorCode>)
fn transmitted_word(&self, _rcode: Result<(), ErrorCode>)
A call to
Transmit::transmit_word
completed. The Result<(), ErrorCode>
indicates whether the word was successfully transmitted. A call
to transmit_word
or transmit_buffer
made within this callback
SHOULD NOT return BUSY: when this callback is made the UART should
be ready to receive another call. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DebugWriter
impl !Send for DebugWriter
impl !Sync for DebugWriter
impl Unpin for DebugWriter
impl !UnwindSafe for DebugWriter
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