Skip to content
Snippets Groups Projects
Commit e11f6995 authored by Per's avatar Per
Browse files

for forked cortex-m

parent c278f3a2
No related branches found
No related tags found
No related merge requests found
[package]
name = "cortex-m-debug"
version = "0.1.0"
version = "0.1.1"
authors = ["Per Lindgren <per.lindgren@ltu.se>"]
[dependencies]
......
......@@ -4,18 +4,24 @@
#[macro_export]
macro_rules! ip {
($s:expr) => {
{
extern crate cortex_m;
#[allow(unsafe_code)]
cortex_m::itm::write_str(
unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] },
$s
);
}
};
($($arg:tt)*) => {
{
extern crate cortex_m;
#[allow(unsafe_code)]
cortex_m::itm::write_fmt(
unsafe { &(&*cortex_m::peripheral::ITM.get()).stim[0] },
format_args!($($arg)*
));
format_args!($($arg)*)
);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment