aboutsummaryrefslogtreecommitdiff
path: root/README.md
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 /README.md
parentd881f3ad9186cf3279aa1ba27093bad94035c186 (diff)
Remove HAL initialization from #[embassy::main] macro.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 423740674..eaa1e10ab 100644
--- a/README.md
+++ b/README.md
@@ -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]
68async fn main(spawner: Spawner, p: Peripherals) { 68async 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