aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f0
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-08-19 23:32:22 +0200
committerDario Nieuwenhuis <[email protected]>2021-08-19 23:50:19 +0200
commit2c992f701049a9c0e72048b134c26fdb26f2692a (patch)
tree84aa74121769c9d9f3917cb493befd0fa14841cc /examples/stm32f0
parent446d6c275c2c3e0dcc57dd69c3c1b1e7f6c92488 (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.rs2
-rw-r--r--examples/stm32f0/src/example_common.rs7
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"]
13mod example_common; 13mod example_common;
14 14
15#[embassy::main(config = "example_common::config()")] 15#[embassy::main]
16async fn main(_spawner: Spawner, _p: Peripherals) -> ! { 16async 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 _;
6pub use defmt::*; 6pub use defmt::*;
7 7
8use core::sync::atomic::{AtomicUsize, Ordering}; 8use core::sync::atomic::{AtomicUsize, Ordering};
9use embassy_stm32::Config;
10
11pub fn config() -> Config {
12 let mut config = Config::default();
13 config.rcc.enable_debug_wfe = true;
14 config
15}
16 9
17defmt::timestamp! {"{=u64}", { 10defmt::timestamp! {"{=u64}", {
18 static COUNT: AtomicUsize = AtomicUsize::new(0); 11 static COUNT: AtomicUsize = AtomicUsize::new(0);