diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-09 01:49:31 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-08-29 13:23:21 +0200 |
| commit | 8aec341f28a00012e1771d5c35d2647e11830755 (patch) | |
| tree | 28ec3bad05e5dcb6ec949493688111839bb6865b /examples/rp235x/src/bin/sharing.rs | |
| parent | 34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff) | |
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'examples/rp235x/src/bin/sharing.rs')
| -rw-r--r-- | examples/rp235x/src/bin/sharing.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rp235x/src/bin/sharing.rs b/examples/rp235x/src/bin/sharing.rs index 856be6ace..d4c89946b 100644 --- a/examples/rp235x/src/bin/sharing.rs +++ b/examples/rp235x/src/bin/sharing.rs | |||
| @@ -68,7 +68,7 @@ fn main() -> ! { | |||
| 68 | // High-priority executor: runs in interrupt mode | 68 | // High-priority executor: runs in interrupt mode |
| 69 | interrupt::SWI_IRQ_0.set_priority(Priority::P3); | 69 | interrupt::SWI_IRQ_0.set_priority(Priority::P3); |
| 70 | let spawner = EXECUTOR_HI.start(interrupt::SWI_IRQ_0); | 70 | let spawner = EXECUTOR_HI.start(interrupt::SWI_IRQ_0); |
| 71 | spawner.must_spawn(task_a(uart)); | 71 | spawner.spawn(task_a(uart).unwrap()); |
| 72 | 72 | ||
| 73 | // Low priority executor: runs in thread mode | 73 | // Low priority executor: runs in thread mode |
| 74 | let executor = EXECUTOR_LOW.init(Executor::new()); | 74 | let executor = EXECUTOR_LOW.init(Executor::new()); |
| @@ -83,8 +83,8 @@ fn main() -> ! { | |||
| 83 | static REF_CELL: ConstStaticCell<RefCell<MyType>> = ConstStaticCell::new(RefCell::new(MyType { inner: 0 })); | 83 | static REF_CELL: ConstStaticCell<RefCell<MyType>> = ConstStaticCell::new(RefCell::new(MyType { inner: 0 })); |
| 84 | let ref_cell = REF_CELL.take(); | 84 | let ref_cell = REF_CELL.take(); |
| 85 | 85 | ||
| 86 | spawner.must_spawn(task_b(uart, cell, ref_cell)); | 86 | spawner.spawn(task_b(uart, cell, ref_cell).unwrap()); |
| 87 | spawner.must_spawn(task_c(cell, ref_cell)); | 87 | spawner.spawn(task_c(cell, ref_cell).unwrap()); |
| 88 | }); | 88 | }); |
| 89 | } | 89 | } |
| 90 | 90 | ||
