27 lines
834 B
Rust
27 lines
834 B
Rust
|
#[macro_export]
|
||
|
macro_rules! print {
|
||
|
($($arg:tt)*) => ($crate::vga_buffer::_print(format_args!($($arg)*)));
|
||
|
}
|
||
|
|
||
|
#[macro_export]
|
||
|
macro_rules! println {
|
||
|
() => ($crate::print!("\n"));
|
||
|
($($arg:tt)*) => ($crate::print!("{}\n", format_args!($($arg)*)));
|
||
|
}
|
||
|
|
||
|
/// Prints to the host through the serial interface
|
||
|
#[macro_export]
|
||
|
macro_rules! serial_print {
|
||
|
($($arg:tt)*) => ($crate::serial::_print(format_args!($($arg)*)));
|
||
|
}
|
||
|
|
||
|
/// Prints to the host through the serial interface, appending a newline.
|
||
|
#[macro_export]
|
||
|
macro_rules! serial_println {
|
||
|
() => ($crate::serial_print!("\n"));
|
||
|
($($arg:tt)*) => ($crate::serial_print!("{}\n", format_args!($($arg)*)));
|
||
|
($fmt:expr) => ($crate::serial_print!(concat!($fmt, "\n")));
|
||
|
($fmt:expr, $(arg:tt)*) => ($crate::serial_print!(
|
||
|
concat!($fmt, "\n"), $($arg)*));
|
||
|
}
|