mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 04:32:27 +00:00
Reduce clutter by using print macros with fmt
This commit is contained in:
17
src/lib.rs
17
src/lib.rs
@@ -2,6 +2,23 @@
|
||||
|
||||
use core::ptr::{read_volatile, write_volatile};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
() => {};
|
||||
($($arg:tt)*) => {
|
||||
$crate::peripherals::uart::_print(format_args!($($arg)*))
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => {};
|
||||
($($arg:tt)*) => {
|
||||
print!($($arg)*);
|
||||
print!("\r\n");
|
||||
};
|
||||
}
|
||||
|
||||
pub mod peripherals;
|
||||
|
||||
pub mod configuration;
|
||||
|
||||
Reference in New Issue
Block a user