aboutsummaryrefslogtreecommitdiffstats
path: root/samd21-host/examples/simple/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'samd21-host/examples/simple/macros.rs')
-rw-r--r--samd21-host/examples/simple/macros.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/samd21-host/examples/simple/macros.rs b/samd21-host/examples/simple/macros.rs
new file mode 100644
index 0000000..46d2d07
--- /dev/null
+++ b/samd21-host/examples/simple/macros.rs
@@ -0,0 +1,15 @@
+#[macro_export]
+macro_rules! logln_now {
+ ($($arg:tt)*) => {
+ unsafe {crate::logger::write_fmt_now(format_args!($($arg)*), true);}
+ };
+ (_) => {};
+}
+
+#[macro_export]
+macro_rules! log_now {
+ ($($arg:tt)*) => {
+ unsafe {crate::logger::write_fmt_now(format_args!($($arg)*), false);}
+ };
+ (_) => {};
+}