File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
3
- use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
4
-
5
3
use defmt_rtt as _; // global logger
6
4
use panic_probe as _;
7
5
use stm32f0xx_hal as _; // memory layout // panic handler
@@ -17,14 +15,6 @@ fn panic() -> ! {
17
15
cortex_m:: asm:: udf ( )
18
16
}
19
17
20
- static COUNT : AtomicUsize = AtomicUsize :: new ( 0 ) ;
21
- defmt:: timestamp!( "{=usize}" , {
22
- // NOTE(no-CAS) `timestamps` runs with interrupts disabled
23
- let n = COUNT . load( Ordering :: Relaxed ) ;
24
- COUNT . store( n + 1 , Ordering :: Relaxed ) ;
25
- n
26
- } ) ;
27
-
28
18
/// Terminates the application and makes `probe-run` exit with exit-code = 0
29
19
pub fn exit ( ) -> ! {
30
20
loop {
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ mod app {
75
75
use super :: * ;
76
76
use systick_monotonic:: * ; // Implements the `Monotonic` trait
77
77
78
+ defmt:: timestamp!( "{=u64}" , monotonics:: now( ) . ticks( ) ) ;
79
+
78
80
pub enum Message {
79
81
/// Word from PS/2 port 0
80
82
Ps2Data0 ( u16 ) ,
You can’t perform that action at this time.
0 commit comments