Created
August 23, 2019 13:04
-
-
Save mvirkkunen/eb03059c017a94e9420af8ef31629584 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_export] | |
macro_rules! println { | |
($($arg:tt)*) => { | |
cortex_m::interrupt::free(|_| { | |
let itm = unsafe { &mut *cortex_m::peripheral::ITM::ptr() }; | |
cortex_m::iprintln!(&mut itm.stim[0], $($arg)*); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment