Files
asterinas/framework/aster-frame/src/console.rs
2024-05-31 16:09:53 +08:00

23 lines
502 B
Rust

// SPDX-License-Identifier: MPL-2.0
use core::fmt::Arguments;
pub fn print(args: Arguments) {
crate::arch::console::print(args);
}
#[macro_export]
macro_rules! early_print {
($fmt: literal $(, $($arg: tt)+)?) => {
$crate::console::print(format_args!($fmt $(, $($arg)+)?))
}
}
#[macro_export]
macro_rules! early_println {
() => { $crate::early_print!("\n") };
($fmt: literal $(, $($arg: tt)+)?) => {
$crate::console::print(format_args!(concat!($fmt, "\n") $(, $($arg)+)?))
}
}