From f50f72a200968bd66863a1733da984199cbe7761 Mon Sep 17 00:00:00 2001 From: Charles-Henri Mousset Date: Sat, 4 Jan 2025 08:29:32 +0100 Subject: [PATCH] [enh] added print! macro --- src/debug.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/debug.rs b/src/debug.rs index 8c8c646..0dc4d71 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -67,3 +67,15 @@ macro_rules! println { } } } + +#[macro_export] +macro_rules! print { + ($($arg:tt)*) => { + { + use core::fmt::Write; + use core::write; + + write!(&mut $crate::debug::SDIPrint, $($arg)*).unwrap(); + } + } +}