Add raw trace function
This commit is contained in:
parent
ed2cf05838
commit
df131ab13b
10
src/debug.rs
10
src/debug.rs
@ -25,6 +25,16 @@ impl fmt::Write for TracePrinter {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trace raw message into the kernel's log. If the message is not a valid unicode string, it will
|
||||
/// get discarded.
|
||||
pub fn trace_raw(data: &[u8]) {
|
||||
if let Ok(str) = core::str::from_utf8(data) {
|
||||
unsafe {
|
||||
crate::sys::debug_trace(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub fn _debug_trace(a: core::fmt::Arguments<'_>) {
|
||||
use fmt::Write;
|
||||
|
Loading…
x
Reference in New Issue
Block a user