veecle_osal_embassy/
log.rs1pub use veecle_osal_api::log::LogTarget;
4
5#[cfg(not(target_os = "none"))]
6use std::io::Write;
7
8#[derive(Debug)]
10pub struct Log;
11
12impl LogTarget for Log {
13 type Time = crate::time::Time;
14
15 fn init() {
16 #[cfg(target_os = "none")]
17 rtt_target::rtt_init_print!();
18 }
19
20 fn println(args: core::fmt::Arguments<'_>) {
21 #[cfg(not(target_os = "none"))]
22 let _ = std::writeln!(std::io::stdout(), "{args}");
24
25 #[cfg(target_os = "none")]
26 rtt_target::rprintln!("{}", args);
29 }
30}