diff options
| author | Barnaby Walters <[email protected]> | 2024-04-07 15:19:56 +0200 |
|---|---|---|
| committer | Barnaby Walters <[email protected]> | 2024-04-07 15:19:56 +0200 |
| commit | cf0097162cb33d77d90ce5cb50f8fb5c24972748 (patch) | |
| tree | f4efcf21af4283efbc3a43e1151d8cfdc1d85113 /examples/stm32f3/src | |
| parent | 328cb99068c3b75489969406dceddc7783882df1 (diff) | |
[embassy-stm32] added comments explaining multiprio interrupts
Diffstat (limited to 'examples/stm32f3/src')
| -rw-r--r-- | examples/stm32f3/src/bin/multiprio.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/stm32f3/src/bin/multiprio.rs b/examples/stm32f3/src/bin/multiprio.rs index 328447210..3a3059db1 100644 --- a/examples/stm32f3/src/bin/multiprio.rs +++ b/examples/stm32f3/src/bin/multiprio.rs | |||
| @@ -127,6 +127,10 @@ fn main() -> ! { | |||
| 127 | 127 | ||
| 128 | let _p = embassy_stm32::init(Default::default()); | 128 | let _p = embassy_stm32::init(Default::default()); |
| 129 | 129 | ||
| 130 | // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used | ||
| 131 | // by the rest of your application. In this case we’re using UART4 and UART5, but there’s nothing special | ||
| 132 | // about them. Any otherwise unused interrupt vector would work exactly the same. | ||
| 133 | |||
| 130 | // High-priority executor: UART4, priority level 6 | 134 | // High-priority executor: UART4, priority level 6 |
| 131 | interrupt::UART4.set_priority(Priority::P6); | 135 | interrupt::UART4.set_priority(Priority::P6); |
| 132 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); | 136 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
