diff options
Diffstat (limited to 'tests/stm32/src/example_common.rs')
| -rw-r--r-- | tests/stm32/src/example_common.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/stm32/src/example_common.rs b/tests/stm32/src/example_common.rs index c47ed75c4..a4f8668c7 100644 --- a/tests/stm32/src/example_common.rs +++ b/tests/stm32/src/example_common.rs | |||
| @@ -1,22 +1,11 @@ | |||
| 1 | #![macro_use] | 1 | #![macro_use] |
| 2 | 2 | ||
| 3 | use core::sync::atomic::{AtomicUsize, Ordering}; | ||
| 4 | |||
| 5 | pub use defmt::*; | 3 | pub use defmt::*; |
| 6 | #[allow(unused)] | 4 | #[allow(unused)] |
| 7 | use embassy_stm32::time::Hertz; | 5 | use embassy_stm32::time::Hertz; |
| 8 | use embassy_stm32::Config; | 6 | use embassy_stm32::Config; |
| 9 | use {defmt_rtt as _, panic_probe as _}; | 7 | use {defmt_rtt as _, panic_probe as _}; |
| 10 | 8 | ||
| 11 | defmt::timestamp! {"{=u64}", { | ||
| 12 | static COUNT: AtomicUsize = AtomicUsize::new(0); | ||
| 13 | // NOTE(no-CAS) `timestamps` runs with interrupts disabled | ||
| 14 | let n = COUNT.load(Ordering::Relaxed); | ||
| 15 | COUNT.store(n + 1, Ordering::Relaxed); | ||
| 16 | n as u64 | ||
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | pub fn config() -> Config { | 9 | pub fn config() -> Config { |
| 21 | #[allow(unused_mut)] | 10 | #[allow(unused_mut)] |
| 22 | let mut config = Config::default(); | 11 | let mut config = Config::default(); |
