aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32/src/example_common.rs
diff options
context:
space:
mode:
authorQuentin Smith <[email protected]>2023-07-17 21:31:43 -0400
committerQuentin Smith <[email protected]>2023-07-17 21:31:43 -0400
commit6f02403184eb7fb7990fb88fc9df9c4328a690a3 (patch)
tree748f510e190bb2724750507a6e69ed1a8e08cb20 /tests/stm32/src/example_common.rs
parentd896f80405aa8963877049ed999e4aba25d6e2bb (diff)
parent6b5df4523aa1c4902f02e803450ae4b418e0e3ca (diff)
Merge remote-tracking branch 'origin/main' into nrf-pdm
Diffstat (limited to 'tests/stm32/src/example_common.rs')
-rw-r--r--tests/stm32/src/example_common.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/stm32/src/example_common.rs b/tests/stm32/src/example_common.rs
deleted file mode 100644
index c47ed75c4..000000000
--- a/tests/stm32/src/example_common.rs
+++ /dev/null
@@ -1,31 +0,0 @@
1#![macro_use]
2
3use core::sync::atomic::{AtomicUsize, Ordering};
4
5pub use defmt::*;
6#[allow(unused)]
7use embassy_stm32::time::Hertz;
8use embassy_stm32::Config;
9use {defmt_rtt as _, panic_probe as _};
10
11defmt::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
20pub fn config() -> Config {
21 #[allow(unused_mut)]
22 let mut config = Config::default();
23
24 #[cfg(feature = "stm32h755zi")]
25 {
26 config.rcc.sys_ck = Some(Hertz(400_000_000));
27 config.rcc.pll1.q_ck = Some(Hertz(100_000_000));
28 }
29
30 config
31}