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 /README.md | |
parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
download | embassy-fc6e1e06b305d302d1b7ad17e8ef3a9be986c358.zip |
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -65,7 +65,9 @@ async fn blink(pin: AnyPin) { // Main is itself an async task as well. #[embassy_executor::main] -async fn main(spawner: Spawner, p: Peripherals) { +async fn main(spawner: Spawner) { + let p = embassy_nrf::init(Default::default()); + // Spawned tasks run in the background, concurrently. spawner.spawn(blink(p.P0_13.degrade())).unwrap(); |