[][src]Macro drone_cortex_m::print

macro_rules! print {
    ($str:expr) => { ... };
    ($($arg:tt)*) => { ... };

Prints to the ITM port #0, if a debug probe is connected.

Equivalent to the println! macro except that a newline is not printed at the end of the message.

Note that ITM port is buffered so it may be necessary to use itm::flush to ensure the output is emitted immediately.

Use print! only for the primary output of your program. Use eprint! instead to print error and progress messages.


use drone_cortex_m::{itm, print};

print!("this ");
print!("will ");
print!("be ");
print!("on ");
print!("the ");
print!("same ");
print!("line ");


print!("this string has a newline, why not choose println! instead?\n");