| 1 | #[cfg (all(feature = "defmt" , feature = "log" ))] |
| 2 | compile_error!("You may not enable both `defmt` and `log` features." ); |
| 3 | |
| 4 | #[cfg (feature = "log" )] |
| 5 | #[macro_use ] |
| 6 | mod log { |
| 7 | macro_rules! fmc_log { |
| 8 | (trace, $($arg:expr),*) => { log::trace!($($arg),*); }; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | #[cfg (feature = "defmt" )] |
| 13 | #[macro_use ] |
| 14 | mod log { |
| 15 | macro_rules! fmc_log { |
| 16 | (trace, $($arg:expr),*) => { ::defmt::trace!($($arg),*); }; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | #[cfg (all(not(feature = "log" ), not(feature = "defmt" )))] |
| 21 | #[macro_use ] |
| 22 | mod log { |
| 23 | macro_rules! fmc_log { |
| 24 | ($level:ident, $($arg:expr),*) => { $( let _ = $arg; )* } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | macro_rules! fmc_trace { |
| 29 | ($($arg:expr),*) => (fmc_log!(trace, $($arg),*)); |
| 30 | } |
| 31 | |