diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-11-15 02:22:20 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-11-15 02:22:20 +0100 |
| commit | 3f23fd5c98244921b97858912bbcdfd681b4f92e (patch) | |
| tree | e572b5ebc9dae3c2fedf97b576f188498832220a /examples/nrf52840/src/bin/multiprio.rs | |
| parent | ea1b97ed4032d5f925839165c546833323ef1b01 (diff) | |
Update nrf-pac.
Diffstat (limited to 'examples/nrf52840/src/bin/multiprio.rs')
| -rw-r--r-- | examples/nrf52840/src/bin/multiprio.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/nrf52840/src/bin/multiprio.rs b/examples/nrf52840/src/bin/multiprio.rs index 797be93a7..d58613da4 100644 --- a/examples/nrf52840/src/bin/multiprio.rs +++ b/examples/nrf52840/src/bin/multiprio.rs | |||
| @@ -112,12 +112,12 @@ static EXECUTOR_MED: InterruptExecutor = InterruptExecutor::new(); | |||
| 112 | static EXECUTOR_LOW: StaticCell<Executor> = StaticCell::new(); | 112 | static EXECUTOR_LOW: StaticCell<Executor> = StaticCell::new(); |
| 113 | 113 | ||
| 114 | #[interrupt] | 114 | #[interrupt] |
| 115 | unsafe fn SWI1_EGU1() { | 115 | unsafe fn EGU1_SWI1() { |
| 116 | EXECUTOR_HIGH.on_interrupt() | 116 | EXECUTOR_HIGH.on_interrupt() |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | #[interrupt] | 119 | #[interrupt] |
| 120 | unsafe fn SWI0_EGU0() { | 120 | unsafe fn EGU0_SWI0() { |
| 121 | EXECUTOR_MED.on_interrupt() | 121 | EXECUTOR_MED.on_interrupt() |
| 122 | } | 122 | } |
| 123 | 123 | ||
| @@ -127,14 +127,14 @@ fn main() -> ! { | |||
| 127 | 127 | ||
| 128 | let _p = embassy_nrf::init(Default::default()); | 128 | let _p = embassy_nrf::init(Default::default()); |
| 129 | 129 | ||
| 130 | // High-priority executor: SWI1_EGU1, priority level 6 | 130 | // High-priority executor: EGU1_SWI1, priority level 6 |
| 131 | interrupt::SWI1_EGU1.set_priority(Priority::P6); | 131 | interrupt::EGU1_SWI1.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::SWI1_EGU1); | 132 | let spawner = EXECUTOR_HIGH.start(interrupt::EGU1_SWI1); |
| 133 | unwrap!(spawner.spawn(run_high())); | 133 | unwrap!(spawner.spawn(run_high())); |
| 134 | 134 | ||
| 135 | // Medium-priority executor: SWI0_EGU0, priority level 7 | 135 | // Medium-priority executor: EGU0_SWI0, priority level 7 |
| 136 | interrupt::SWI0_EGU0.set_priority(Priority::P7); | 136 | interrupt::EGU0_SWI0.set_priority(Priority::P7); |
| 137 | let spawner = EXECUTOR_MED.start(interrupt::SWI0_EGU0); | 137 | let spawner = EXECUTOR_MED.start(interrupt::EGU0_SWI0); |
| 138 | unwrap!(spawner.spawn(run_med())); | 138 | unwrap!(spawner.spawn(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 |
