diff options
author | Brian Cully <bjc@kublai.com> | 2019-08-04 15:33:03 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-08-04 19:58:34 -0400 |
commit | e02128bd4d9d2716b55be5db3dccb18f92f01e9c (patch) | |
tree | 8f74b58be72a31a257f11022454fc186060193a3 /examples/simple/macros.rs | |
download | atsamd-usb-host-e02128bd4d9d2716b55be5db3dccb18f92f01e9c.tar.gz atsamd-usb-host-e02128bd4d9d2716b55be5db3dccb18f92f01e9c.zip |
Initial commit
Diffstat (limited to 'examples/simple/macros.rs')
-rw-r--r-- | examples/simple/macros.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/simple/macros.rs b/examples/simple/macros.rs new file mode 100644 index 0000000..46d2d07 --- /dev/null +++ b/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);} + }; + (_) => {}; +} |