summaryrefslogtreecommitdiff
path: root/examples/stm32f0
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-08-17 18:49:55 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-08-17 22:16:46 +0200
commitfc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch)
tree545ad829660f6053d29a01da286d03ec3d49f5ca /examples/stm32f0
parentd881f3ad9186cf3279aa1ba27093bad94035c186 (diff)
downloadembassy-fc6e1e06b305d302d1b7ad17e8ef3a9be986c358.zip
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'examples/stm32f0')
-rw-r--r--examples/stm32f0/src/bin/hello.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f0/src/bin/hello.rs b/examples/stm32f0/src/bin/hello.rs
index c9081ea1..a0775bad 100644
--- a/examples/stm32f0/src/bin/hello.rs
+++ b/examples/stm32f0/src/bin/hello.rs
@@ -5,11 +5,11 @@
use defmt::info;
use embassy_executor::executor::Spawner;
use embassy_executor::time::{Duration, Timer};
-use embassy_stm32::Peripherals;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
-async fn main(_spawner: Spawner, _p: Peripherals) -> ! {
+async fn main(_spawner: Spawner) -> ! {
+ let _p = embassy_stm32::init(Default::default());
loop {
Timer::after(Duration::from_secs(1)).await;
info!("Hello");