aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f3/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-07-09 01:49:31 +0200
committerdiondokter <[email protected]>2025-08-29 13:23:21 +0200
commit8aec341f28a00012e1771d5c35d2647e11830755 (patch)
tree28ec3bad05e5dcb6ec949493688111839bb6865b /examples/stm32f3/src
parent34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff)
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'examples/stm32f3/src')
-rw-r--r--examples/stm32f3/src/bin/button_events.rs4
-rw-r--r--examples/stm32f3/src/bin/multiprio.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32f3/src/bin/button_events.rs b/examples/stm32f3/src/bin/button_events.rs
index f5ed5d2c9..a54d03212 100644
--- a/examples/stm32f3/src/bin/button_events.rs
+++ b/examples/stm32f3/src/bin/button_events.rs
@@ -113,8 +113,8 @@ async fn main(spawner: Spawner) {
113 ]; 113 ];
114 let leds = Leds::new(leds); 114 let leds = Leds::new(leds);
115 115
116 spawner.spawn(button_waiter(button)).unwrap(); 116 spawner.spawn(button_waiter(button).unwrap());
117 spawner.spawn(led_blinker(leds)).unwrap(); 117 spawner.spawn(led_blinker(leds).unwrap());
118} 118}
119 119
120#[embassy_executor::task] 120#[embassy_executor::task]
diff --git a/examples/stm32f3/src/bin/multiprio.rs b/examples/stm32f3/src/bin/multiprio.rs
index b4620888f..2f2ffdea2 100644
--- a/examples/stm32f3/src/bin/multiprio.rs
+++ b/examples/stm32f3/src/bin/multiprio.rs
@@ -135,16 +135,16 @@ fn main() -> ! {
135 // High-priority executor: UART4, priority level 6 135 // High-priority executor: UART4, priority level 6
136 interrupt::UART4.set_priority(Priority::P6); 136 interrupt::UART4.set_priority(Priority::P6);
137 let spawner = EXECUTOR_HIGH.start(interrupt::UART4); 137 let spawner = EXECUTOR_HIGH.start(interrupt::UART4);
138 unwrap!(spawner.spawn(run_high())); 138 spawner.spawn(unwrap!(run_high()));
139 139
140 // Medium-priority executor: UART5, priority level 7 140 // Medium-priority executor: UART5, priority level 7
141 interrupt::UART5.set_priority(Priority::P7); 141 interrupt::UART5.set_priority(Priority::P7);
142 let spawner = EXECUTOR_MED.start(interrupt::UART5); 142 let spawner = EXECUTOR_MED.start(interrupt::UART5);
143 unwrap!(spawner.spawn(run_med())); 143 spawner.spawn(unwrap!(run_med()));
144 144
145 // Low priority executor: runs in thread mode, using WFE/SEV 145 // Low priority executor: runs in thread mode, using WFE/SEV
146 let executor = EXECUTOR_LOW.init(Executor::new()); 146 let executor = EXECUTOR_LOW.init(Executor::new());
147 executor.run(|spawner| { 147 executor.run(|spawner| {
148 unwrap!(spawner.spawn(run_low())); 148 spawner.spawn(unwrap!(run_low()));
149 }); 149 });
150} 150}