diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-08-17 18:49:55 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-08-17 22:16:46 +0200 |
| commit | fc6e1e06b305d302d1b7ad17e8ef3a9be986c358 (patch) | |
| tree | 545ad829660f6053d29a01da286d03ec3d49f5ca /README.md | |
| parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
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) { | |||
| 65 | 65 | ||
| 66 | // Main is itself an async task as well. | 66 | // Main is itself an async task as well. |
| 67 | #[embassy_executor::main] | 67 | #[embassy_executor::main] |
| 68 | async fn main(spawner: Spawner, p: Peripherals) { | 68 | async fn main(spawner: Spawner) { |
| 69 | let p = embassy_nrf::init(Default::default()); | ||
| 70 | |||
| 69 | // Spawned tasks run in the background, concurrently. | 71 | // Spawned tasks run in the background, concurrently. |
| 70 | spawner.spawn(blink(p.P0_13.degrade())).unwrap(); | 72 | spawner.spawn(blink(p.P0_13.degrade())).unwrap(); |
| 71 | 73 | ||
