Update example code
This commit is contained in:
+2
-8
@@ -15,14 +15,8 @@ fn panic() -> ! {
|
||||
cortex_m::asm::udf()
|
||||
}
|
||||
|
||||
#[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
|
||||
}
|
||||
static COUNT: AtomicUsize = AtomicUsize::new(0);
|
||||
defmt::timestamp!("{=usize}", COUNT.fetch_add(1, Ordering::Relaxed));
|
||||
|
||||
/// Terminates the application and makes `probe-run` exit with exit-code = 0
|
||||
pub fn exit() -> ! {
|
||||
|
||||
Reference in New Issue
Block a user