diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2022-08-17 18:49:55 +0200 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2022-08-17 22:16:46 +0200 |
commit | fc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch) | |
tree | 545ad829660f6053d29a01da286d03ec3d49f5ca /examples/stm32f0 | |
parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
download | embassy-fc6e1e06b305d302d1b7ad17e8ef3a9be986c358.zip |
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'examples/stm32f0')
-rw-r--r-- | examples/stm32f0/src/bin/hello.rs | 4 |
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"); |