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

sprintln

parent 8be27788
Branches
No related tags found
No related merge requests found
......@@ -33,3 +33,27 @@ macro_rules! ipln {
ip!(concat!($fmt, "\n"), $($arg)*);
};
}
/// Macro for sending a formatted string overes semihosting, with a newline.
#[macro_export]
macro_rules! sprintln {
($($e:tt)*) => {
{
extern crate cortex_m_semihosting;
use core::fmt::Write;
writeln!(cortex_m_semihosting::hio::hstdout().unwrap(), $($e)*).unwrap();
}
}
}
/// Macro for sending a formatted string overes semihosting.
#[macro_export]
macro_rules! sprint {
($($e:tt)*) => {
{
extern crate cortex_m_semihosting;
use core::fmt::Write;
write!(cortex_m_semihosting::hio::hstdout().unwrap(), $($e)*).unwrap();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment