aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/self_spawn_current_executor.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-08-17 18:49:55 +0200
committerDario Nieuwenhuis <[email protected]>2022-08-17 22:16:46 +0200
commitfc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch)
tree545ad829660f6053d29a01da286d03ec3d49f5ca /examples/nrf/src/bin/self_spawn_current_executor.rs
parentd881f3ad9186cf3279aa1ba27093bad94035c186 (diff)
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'examples/nrf/src/bin/self_spawn_current_executor.rs')
-rw-r--r--examples/nrf/src/bin/self_spawn_current_executor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/nrf/src/bin/self_spawn_current_executor.rs b/examples/nrf/src/bin/self_spawn_current_executor.rs
index 1d8309d77..11fe6fb40 100644
--- a/examples/nrf/src/bin/self_spawn_current_executor.rs
+++ b/examples/nrf/src/bin/self_spawn_current_executor.rs
@@ -5,7 +5,6 @@
5use defmt::{info, unwrap}; 5use defmt::{info, unwrap};
6use embassy_executor::executor::Spawner; 6use embassy_executor::executor::Spawner;
7use embassy_executor::time::{Duration, Timer}; 7use embassy_executor::time::{Duration, Timer};
8use embassy_nrf::Peripherals;
9use {defmt_rtt as _, panic_probe as _}; 8use {defmt_rtt as _, panic_probe as _};
10 9
11#[embassy_executor::task(pool_size = 2)] 10#[embassy_executor::task(pool_size = 2)]
@@ -16,7 +15,8 @@ async fn my_task(n: u32) {
16} 15}
17 16
18#[embassy_executor::main] 17#[embassy_executor::main]
19async fn main(spawner: Spawner, _p: Peripherals) { 18async fn main(spawner: Spawner) {
19 let _p = embassy_nrf::init(Default::default());
20 info!("Hello World!"); 20 info!("Hello World!");
21 unwrap!(spawner.spawn(my_task(0))); 21 unwrap!(spawner.spawn(my_task(0)));
22} 22}