diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-08-19 23:32:22 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-08-19 23:50:19 +0200 |
| commit | 2c992f701049a9c0e72048b134c26fdb26f2692a (patch) | |
| tree | 84aa74121769c9d9f3917cb493befd0fa14841cc /examples/stm32f0 | |
| parent | 446d6c275c2c3e0dcc57dd69c3c1b1e7f6c92488 (diff) | |
stm32: move dbgmcu stuff to toplevel config setting, defaulting to true.
Diffstat (limited to 'examples/stm32f0')
| -rw-r--r-- | examples/stm32f0/src/bin/hello.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f0/src/example_common.rs | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/examples/stm32f0/src/bin/hello.rs b/examples/stm32f0/src/bin/hello.rs index 8429cc603..418f27943 100644 --- a/examples/stm32f0/src/bin/hello.rs +++ b/examples/stm32f0/src/bin/hello.rs | |||
| @@ -12,7 +12,7 @@ use embassy_stm32::Peripherals; | |||
| 12 | #[path = "../example_common.rs"] | 12 | #[path = "../example_common.rs"] |
| 13 | mod example_common; | 13 | mod example_common; |
| 14 | 14 | ||
| 15 | #[embassy::main(config = "example_common::config()")] | 15 | #[embassy::main] |
| 16 | async fn main(_spawner: Spawner, _p: Peripherals) -> ! { | 16 | async fn main(_spawner: Spawner, _p: Peripherals) -> ! { |
| 17 | loop { | 17 | loop { |
| 18 | Timer::after(Duration::from_secs(1)).await; | 18 | Timer::after(Duration::from_secs(1)).await; |
diff --git a/examples/stm32f0/src/example_common.rs b/examples/stm32f0/src/example_common.rs index f50119653..54d633837 100644 --- a/examples/stm32f0/src/example_common.rs +++ b/examples/stm32f0/src/example_common.rs | |||
| @@ -6,13 +6,6 @@ use panic_probe as _; | |||
| 6 | pub use defmt::*; | 6 | pub use defmt::*; |
| 7 | 7 | ||
| 8 | use core::sync::atomic::{AtomicUsize, Ordering}; | 8 | use core::sync::atomic::{AtomicUsize, Ordering}; |
| 9 | use embassy_stm32::Config; | ||
| 10 | |||
| 11 | pub fn config() -> Config { | ||
| 12 | let mut config = Config::default(); | ||
| 13 | config.rcc.enable_debug_wfe = true; | ||
| 14 | config | ||
| 15 | } | ||
| 16 | 9 | ||
| 17 | defmt::timestamp! {"{=u64}", { | 10 | defmt::timestamp! {"{=u64}", { |
| 18 | static COUNT: AtomicUsize = AtomicUsize::new(0); | 11 | static COUNT: AtomicUsize = AtomicUsize::new(0); |
