diff options
Diffstat (limited to 'examples/nrf52840/src/bin/multiprio.rs')
| -rw-r--r-- | examples/nrf52840/src/bin/multiprio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/nrf52840/src/bin/multiprio.rs b/examples/nrf52840/src/bin/multiprio.rs index d58613da4..4d9b986d4 100644 --- a/examples/nrf52840/src/bin/multiprio.rs +++ b/examples/nrf52840/src/bin/multiprio.rs | |||
| @@ -130,16 +130,16 @@ fn main() -> ! { | |||
| 130 | // High-priority executor: EGU1_SWI1, priority level 6 | 130 | // High-priority executor: EGU1_SWI1, priority level 6 |
| 131 | interrupt::EGU1_SWI1.set_priority(Priority::P6); | 131 | interrupt::EGU1_SWI1.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::EGU1_SWI1); | 132 | let spawner = EXECUTOR_HIGH.start(interrupt::EGU1_SWI1); |
| 133 | unwrap!(spawner.spawn(run_high())); | 133 | spawner.spawn(unwrap!(run_high())); |
| 134 | 134 | ||
| 135 | // Medium-priority executor: EGU0_SWI0, priority level 7 | 135 | // Medium-priority executor: EGU0_SWI0, priority level 7 |
| 136 | interrupt::EGU0_SWI0.set_priority(Priority::P7); | 136 | interrupt::EGU0_SWI0.set_priority(Priority::P7); |
| 137 | let spawner = EXECUTOR_MED.start(interrupt::EGU0_SWI0); | 137 | let spawner = EXECUTOR_MED.start(interrupt::EGU0_SWI0); |
| 138 | unwrap!(spawner.spawn(run_med())); | 138 | spawner.spawn(unwrap!(run_med())); |
| 139 | 139 | ||
| 140 | // Low priority executor: runs in thread mode, using WFE/SEV | 140 | // Low priority executor: runs in thread mode, using WFE/SEV |
| 141 | let executor = EXECUTOR_LOW.init(Executor::new()); | 141 | let executor = EXECUTOR_LOW.init(Executor::new()); |
| 142 | executor.run(|spawner| { | 142 | executor.run(|spawner| { |
| 143 | unwrap!(spawner.spawn(run_low())); | 143 | spawner.spawn(unwrap!(run_low())); |
| 144 | }); | 144 | }); |
| 145 | } | 145 | } |
