Use embassy/defmt-timestamp-uptime in all examples.

This commit is contained in:
Dario Nieuwenhuis
2022-04-02 04:35:06 +02:00
parent a9e63167e1
commit 82803bffda
162 changed files with 490 additions and 765 deletions

View File

@@ -10,23 +10,12 @@ use embassy_stm32::i2c::I2c;
use embassy_stm32::interrupt;
use embassy_stm32::rcc::{Mco, Mco1Source, McoClock};
use embassy_stm32::time::U32Ext;
use embassy_stm32::Config;
use embassy_stm32::Peripherals;
use defmt_rtt as _; // global logger
use panic_probe as _;
use core::sync::atomic::{AtomicUsize, Ordering};
use embassy_stm32::Config;
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
}
}
#[allow(unused)]
pub fn config() -> Config {
let mut config = Config::default();