diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf/src/bin/mpsc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/nrf/src/bin/mpsc.rs b/examples/nrf/src/bin/mpsc.rs index c2cb107e1..443955239 100644 --- a/examples/nrf/src/bin/mpsc.rs +++ b/examples/nrf/src/bin/mpsc.rs | |||
| @@ -37,9 +37,10 @@ async fn my_task(sender: Sender<'static, WithNoThreads, LedState, 1>) { | |||
| 37 | 37 | ||
| 38 | #[embassy::main] | 38 | #[embassy::main] |
| 39 | async fn main(spawner: Spawner, p: Peripherals) { | 39 | async fn main(spawner: Spawner, p: Peripherals) { |
| 40 | |||
| 40 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); | 41 | let mut led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard); |
| 41 | 42 | ||
| 42 | let channel = CHANNEL.put(Channel::with_no_threads()); | 43 | let channel = CHANNEL.put(Channel::new()); |
| 43 | let (sender, mut receiver) = mpsc::split(channel); | 44 | let (sender, mut receiver) = mpsc::split(channel); |
| 44 | 45 | ||
| 45 | spawner.spawn(my_task(sender)).unwrap(); | 46 | spawner.spawn(my_task(sender)).unwrap(); |
