aboutsummaryrefslogtreecommitdiff
path: root/examples/rp235x/src/bin/sharing.rs
diff options
context:
space:
mode:
author1-rafael-1 <[email protected]>2025-09-15 20:07:18 +0200
committer1-rafael-1 <[email protected]>2025-09-15 20:07:18 +0200
commit6bb3d2c0720fa082f27d3cdb70f516058497ec87 (patch)
tree5a1e255cff999b00800f203b91a759c720c973e5 /examples/rp235x/src/bin/sharing.rs
parenteb685574601d98c44faed9a3534d056199b46e20 (diff)
parent92a6fd2946f2cbb15359290f68aa360953da2ff7 (diff)
Merge branch 'main' into rp2040-rtc-alarm
Diffstat (limited to 'examples/rp235x/src/bin/sharing.rs')
-rw-r--r--examples/rp235x/src/bin/sharing.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/rp235x/src/bin/sharing.rs b/examples/rp235x/src/bin/sharing.rs
index 497c4f845..d4c89946b 100644
--- a/examples/rp235x/src/bin/sharing.rs
+++ b/examples/rp235x/src/bin/sharing.rs
@@ -27,7 +27,6 @@ use embassy_rp::{bind_interrupts, interrupt};
27use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; 27use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
28use embassy_sync::{blocking_mutex, mutex}; 28use embassy_sync::{blocking_mutex, mutex};
29use embassy_time::{Duration, Ticker}; 29use embassy_time::{Duration, Ticker};
30use rand::RngCore;
31use static_cell::{ConstStaticCell, StaticCell}; 30use static_cell::{ConstStaticCell, StaticCell};
32use {defmt_rtt as _, panic_probe as _}; 31use {defmt_rtt as _, panic_probe as _};
33 32
@@ -69,7 +68,7 @@ fn main() -> ! {
69 // High-priority executor: runs in interrupt mode 68 // High-priority executor: runs in interrupt mode
70 interrupt::SWI_IRQ_0.set_priority(Priority::P3); 69 interrupt::SWI_IRQ_0.set_priority(Priority::P3);
71 let spawner = EXECUTOR_HI.start(interrupt::SWI_IRQ_0); 70 let spawner = EXECUTOR_HI.start(interrupt::SWI_IRQ_0);
72 spawner.must_spawn(task_a(uart)); 71 spawner.spawn(task_a(uart).unwrap());
73 72
74 // Low priority executor: runs in thread mode 73 // Low priority executor: runs in thread mode
75 let executor = EXECUTOR_LOW.init(Executor::new()); 74 let executor = EXECUTOR_LOW.init(Executor::new());
@@ -84,8 +83,8 @@ fn main() -> ! {
84 static REF_CELL: ConstStaticCell<RefCell<MyType>> = ConstStaticCell::new(RefCell::new(MyType { inner: 0 })); 83 static REF_CELL: ConstStaticCell<RefCell<MyType>> = ConstStaticCell::new(RefCell::new(MyType { inner: 0 }));
85 let ref_cell = REF_CELL.take(); 84 let ref_cell = REF_CELL.take();
86 85
87 spawner.must_spawn(task_b(uart, cell, ref_cell)); 86 spawner.spawn(task_b(uart, cell, ref_cell).unwrap());
88 spawner.must_spawn(task_c(cell, ref_cell)); 87 spawner.spawn(task_c(cell, ref_cell).unwrap());
89 }); 88 });
90} 89}
91 90