aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-08-17 20:27:42 +0000
committerGitHub <[email protected]>2022-08-17 20:27:42 +0000
commit1c5b54a4823d596db730eb476c3ab78110557214 (patch)
tree1d22c32eae26435677df89083d71f50fc298a09f /README.md
parentd881f3ad9186cf3279aa1ba27093bad94035c186 (diff)
parent2e85eaf7d5f4dcf6d84f426542b8ec87aa51c429 (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.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