update defmt and defmt-rtt to 0.2.0

This commit is contained in:
fnafnio
2021-02-24 08:44:23 +01:00
parent 465ca9086d
commit f779ec4928
9 changed files with 23 additions and 23 deletions

View File

@ -8,11 +8,11 @@ pub use defmt::*;
use core::sync::atomic::{AtomicUsize, Ordering};
#[defmt::timestamp]
fn timestamp() -> u64 {
static COUNT: AtomicUsize = AtomicUsize::new(0);
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
let n = COUNT.load(Ordering::Relaxed);
COUNT.store(n + 1, Ordering::Relaxed);
n as u64
defmt::timestamp! {"{=u64}", {
static COUNT: AtomicUsize = AtomicUsize::new(0);
// NOTE(no-CAS) `timestamps` runs with interrupts disabled
let n = COUNT.load(Ordering::Relaxed);
COUNT.store(n + 1, Ordering::Relaxed);
n as u64
}
}