Share print! and println! between architectures
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
pub mod macros;
|
||||
|
||||
/// Constants like memory locations
|
||||
pub mod consts;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/// Print to console
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => ({
|
||||
use core::fmt::Write;
|
||||
let _ = write!($crate::arch::debug::Writer::new(), $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
/// Print with new line to console
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => (print!("\n"));
|
||||
($fmt:expr_2021) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr_2021, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||
}
|
||||
@@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
pub mod macros;
|
||||
|
||||
pub mod consts;
|
||||
pub mod debug;
|
||||
pub mod device;
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
/// Print to console
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => ({
|
||||
use core::fmt::Write;
|
||||
let _ = write!($crate::arch::debug::Writer::new(), $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
/// Print with new line to console
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => (print!("\n"));
|
||||
($fmt:expr_2021) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr_2021, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! irqs(
|
||||
( [ $( ($idt:expr_2021, $number:literal, $name:ident) ,)* ], $submac:ident ) => {
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
/// Print to console
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => ({
|
||||
use core::fmt::Write;
|
||||
let _ = write!($crate::arch::debug::Writer::new(), $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
/// Print with new line to console
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => (print!("\n"));
|
||||
($fmt:expr_2021) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr_2021, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||
}
|
||||
|
||||
macro_rules! expand_bool(
|
||||
($value:expr_2021) => {
|
||||
concat!($value)
|
||||
|
||||
@@ -69,6 +69,9 @@ use crate::consts::*;
|
||||
/// Shared data structures
|
||||
mod common;
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
|
||||
/// Architecture-dependent stuff
|
||||
#[macro_use]
|
||||
#[allow(dead_code)] // TODO
|
||||
|
||||
Reference in New Issue
Block a user