aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f0/src
diff options
context:
space:
mode:
authorBarnaby Walters <[email protected]>2024-04-07 15:19:56 +0200
committerBarnaby Walters <[email protected]>2024-04-07 15:19:56 +0200
commitcf0097162cb33d77d90ce5cb50f8fb5c24972748 (patch)
treef4efcf21af4283efbc3a43e1151d8cfdc1d85113 /examples/stm32f0/src
parent328cb99068c3b75489969406dceddc7783882df1 (diff)
[embassy-stm32] added comments explaining multiprio interrupts
Diffstat (limited to 'examples/stm32f0/src')
-rw-r--r--examples/stm32f0/src/bin/multiprio.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs
index e49951726..e36c0d6c2 100644
--- a/examples/stm32f0/src/bin/multiprio.rs
+++ b/examples/stm32f0/src/bin/multiprio.rs
@@ -126,6 +126,10 @@ fn main() -> ! {
126 // Initialize and create handle for devicer peripherals 126 // Initialize and create handle for devicer peripherals
127 let _p = embassy_stm32::init(Default::default()); 127 let _p = embassy_stm32::init(Default::default());
128 128
129 // STM32s don’t have software-defined interrupts, so just use any free interrupt vectors which aren’t used
130 // by the rest of your application. In this case we’re using UART1 and UART2, but there’s nothing special
131 // about them. Any otherwise unused interrupt vector would work exactly the same.
132
129 // High-priority executor: USART1, priority level 6 133 // High-priority executor: USART1, priority level 6
130 interrupt::USART1.set_priority(Priority::P6); 134 interrupt::USART1.set_priority(Priority::P6);
131 let spawner = EXECUTOR_HIGH.start(interrupt::USART1); 135 let spawner = EXECUTOR_HIGH.start(interrupt::USART1);