stm32: fix build, add ci

This commit is contained in:
Dario Nieuwenhuis
2021-05-17 03:01:30 +02:00
parent cd0d3c4b0d
commit f7858631d8
18 changed files with 166 additions and 7 deletions

View File

@ -0,0 +1,17 @@
#![macro_use]
use defmt_rtt as _; // global logger
use panic_probe as _;
pub use defmt::*;
use core::sync::atomic::{AtomicUsize, Ordering};
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
}
}