aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf/src/bin/uart_split.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-02-11 23:25:30 +0100
committerDario Nieuwenhuis <[email protected]>2022-02-12 01:16:31 +0100
commit6c925b2342708266f24d58020e89786811531d47 (patch)
treee46a871fe4d2845d2bfb29f24c8e688165a17738 /examples/nrf/src/bin/uart_split.rs
parent5ae4e20f8654bdc129d152b5364b6864457c2e02 (diff)
blocking_mutex: refactor to work on stable. No GATs, and can be constructed in const.
Diffstat (limited to 'examples/nrf/src/bin/uart_split.rs')
-rw-r--r--examples/nrf/src/bin/uart_split.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/nrf/src/bin/uart_split.rs b/examples/nrf/src/bin/uart_split.rs
index a9c02e796..9a9bad3e9 100644
--- a/examples/nrf/src/bin/uart_split.rs
+++ b/examples/nrf/src/bin/uart_split.rs
@@ -6,7 +6,7 @@
6mod example_common; 6mod example_common;
7use example_common::*; 7use example_common::*;
8 8
9use embassy::blocking_mutex::kind::Noop; 9use embassy::blocking_mutex::raw::NoopRawMutex;
10use embassy::channel::mpsc::{self, Channel, Sender}; 10use embassy::channel::mpsc::{self, Channel, Sender};
11use embassy::executor::Spawner; 11use embassy::executor::Spawner;
12use embassy::util::Forever; 12use embassy::util::Forever;
@@ -15,7 +15,7 @@ use embassy_nrf::peripherals::UARTE0;
15use embassy_nrf::uarte::UarteRx; 15use embassy_nrf::uarte::UarteRx;
16use embassy_nrf::{interrupt, uarte, Peripherals}; 16use embassy_nrf::{interrupt, uarte, Peripherals};
17 17
18static CHANNEL: Forever<Channel<Noop, [u8; 8], 1>> = Forever::new(); 18static CHANNEL: Forever<Channel<NoopRawMutex, [u8; 8], 1>> = Forever::new();
19 19
20#[embassy::main] 20#[embassy::main]
21async fn main(spawner: Spawner, p: Peripherals) { 21async fn main(spawner: Spawner, p: Peripherals) {
@@ -57,7 +57,7 @@ async fn main(spawner: Spawner, p: Peripherals) {
57} 57}
58 58
59#[embassy::task] 59#[embassy::task]
60async fn reader(mut rx: UarteRx<'static, UARTE0>, s: Sender<'static, Noop, [u8; 8], 1>) { 60async fn reader(mut rx: UarteRx<'static, UARTE0>, s: Sender<'static, NoopRawMutex, [u8; 8], 1>) {
61 let mut buf = [0; 8]; 61 let mut buf = [0; 8];
62 loop { 62 loop {
63 info!("reading..."); 63 info!("reading...");