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
sourceimpl 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
sourceimpl TransmitClient for DebugWriter
impl TransmitClient for DebugWriter
sourcefn 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 more
sourcefn 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 more
Auto Trait Implementations
impl !RefUnwindSafe for DebugWriter
impl !Send for DebugWriter
impl !Sync for DebugWriter
impl Unpin for DebugWriter
impl !UnwindSafe for DebugWriter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more