aboutsummaryrefslogtreecommitdiff
path: root/examples/rp235x/src/bin/assign_resources.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-08-29 12:04:29 +0000
committerGitHub <[email protected]>2025-08-29 12:04:29 +0000
commitf86cf87f2f20f723e2ba2fe7d83908a2b3bac2d1 (patch)
tree57f9200ed729746ef5f077af6c79863c37e824ae /examples/rp235x/src/bin/assign_resources.rs
parentdf10e8a6bc407544d29c234ed00bdec3e9caf837 (diff)
parente2c34ac735888d25d57d3ea07e8915c2e112048c (diff)
Merge pull request #4606 from diondokter/taskmeta-update-2
Taskmeta update
Diffstat (limited to 'examples/rp235x/src/bin/assign_resources.rs')
-rw-r--r--examples/rp235x/src/bin/assign_resources.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/rp235x/src/bin/assign_resources.rs b/examples/rp235x/src/bin/assign_resources.rs
index 341f54d22..4ee4278b5 100644
--- a/examples/rp235x/src/bin/assign_resources.rs
+++ b/examples/rp235x/src/bin/assign_resources.rs
@@ -26,15 +26,13 @@ async fn main(spawner: Spawner) {
26 let p = embassy_rp::init(Default::default()); 26 let p = embassy_rp::init(Default::default());
27 27
28 // 1) Assigning a resource to a task by passing parts of the peripherals. 28 // 1) Assigning a resource to a task by passing parts of the peripherals.
29 spawner 29 spawner.spawn(double_blinky_manually_assigned(spawner, p.PIN_20, p.PIN_21).unwrap());
30 .spawn(double_blinky_manually_assigned(spawner, p.PIN_20, p.PIN_21))
31 .unwrap();
32 30
33 // 2) Using the assign-resources macro to assign resources to a task. 31 // 2) Using the assign-resources macro to assign resources to a task.
34 // we perform the split, see further below for the definition of the resources struct 32 // we perform the split, see further below for the definition of the resources struct
35 let r = split_resources!(p); 33 let r = split_resources!(p);
36 // and then we can use them 34 // and then we can use them
37 spawner.spawn(double_blinky_macro_assigned(spawner, r.leds)).unwrap(); 35 spawner.spawn(double_blinky_macro_assigned(spawner, r.leds).unwrap());
38} 36}
39 37
40// 1) Assigning a resource to a task by passing parts of the peripherals. 38// 1) Assigning a resource to a task by passing parts of the peripherals.