diff options
Diffstat (limited to 'examples/rp/src/bin/assign_resources.rs')
| -rw-r--r-- | examples/rp/src/bin/assign_resources.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/rp/src/bin/assign_resources.rs b/examples/rp/src/bin/assign_resources.rs index 341f54d22..4ee4278b5 100644 --- a/examples/rp/src/bin/assign_resources.rs +++ b/examples/rp/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. |
