forked from M-Labs/zynq-rs
stdio: add print
This commit is contained in:
parent
e5881a14ad
commit
80f003b2c6
|
@ -18,6 +18,15 @@ pub fn get_uart() -> &'static mut Uart {
|
|||
}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => ({
|
||||
use core::fmt::Write;
|
||||
let uart = crate::stdio::get_uart();
|
||||
write!(uart, $($arg)*);
|
||||
})
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
($($arg:tt)*) => ({
|
||||
|
|
Loading…
Reference in New Issue