diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-08-17 20:27:42 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-17 20:27:42 +0000 |
| commit | 1c5b54a4823d596db730eb476c3ab78110557214 (patch) | |
| tree | 1d22c32eae26435677df89083d71f50fc298a09f /README.md | |
| parent | d881f3ad9186cf3279aa1ba27093bad94035c186 (diff) | |
| parent | 2e85eaf7d5f4dcf6d84f426542b8ec87aa51c429 (diff) | |
Merge #908
908: Remove HAL initialization from #[embassy_executor::main] macro. r=Dirbaio a=Dirbaio
Co-authored-by: Dario Nieuwenhuis <[email protected]>
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 | ||
