From fc6e1e06b305d302d1b7ad17e8ef3a9be986c358 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 17 Aug 2022 18:49:55 +0200 Subject: Remove HAL initialization from #[embassy::main] macro. --- tests/stm32/src/bin/timer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/stm32/src/bin/timer.rs') diff --git a/tests/stm32/src/bin/timer.rs b/tests/stm32/src/bin/timer.rs index 76b07ca15..34903084c 100644 --- a/tests/stm32/src/bin/timer.rs +++ b/tests/stm32/src/bin/timer.rs @@ -7,11 +7,11 @@ mod example_common; use defmt::assert; use embassy_executor::executor::Spawner; use embassy_executor::time::{Duration, Instant, Timer}; -use embassy_stm32::Peripherals; use example_common::*; -#[embassy_executor::main(config = "config()")] -async fn main(_spawner: Spawner, _p: Peripherals) { +#[embassy_executor::main] +async fn main(_spawner: Spawner) { + let _p = embassy_stm32::init(config()); info!("Hello World!"); let start = Instant::now(); -- cgit From 5daa173ce4b153a532b4daa9e94c7a248231f25b Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 17 Aug 2022 23:40:16 +0200 Subject: Split embassy-time from embassy-executor. --- tests/stm32/src/bin/timer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/stm32/src/bin/timer.rs') diff --git a/tests/stm32/src/bin/timer.rs b/tests/stm32/src/bin/timer.rs index 34903084c..e00e43bf1 100644 --- a/tests/stm32/src/bin/timer.rs +++ b/tests/stm32/src/bin/timer.rs @@ -5,8 +5,8 @@ #[path = "../example_common.rs"] mod example_common; use defmt::assert; -use embassy_executor::executor::Spawner; -use embassy_executor::time::{Duration, Instant, Timer}; +use embassy_executor::Spawner; +use embassy_time::{Duration, Instant, Timer}; use example_common::*; #[embassy_executor::main] -- cgit