diff options
Diffstat (limited to 'examples/rp/src/bin/blinky_two_tasks.rs')
| -rw-r--r-- | examples/rp/src/bin/blinky_two_tasks.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rp/src/bin/blinky_two_tasks.rs b/examples/rp/src/bin/blinky_two_tasks.rs index a57b513d6..67a9108c0 100644 --- a/examples/rp/src/bin/blinky_two_tasks.rs +++ b/examples/rp/src/bin/blinky_two_tasks.rs | |||
| @@ -11,7 +11,7 @@ use embassy_rp::gpio; | |||
| 11 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; | 11 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; |
| 12 | use embassy_sync::mutex::Mutex; | 12 | use embassy_sync::mutex::Mutex; |
| 13 | use embassy_time::{Duration, Ticker}; | 13 | use embassy_time::{Duration, Ticker}; |
| 14 | use gpio::{AnyPin, Level, Output}; | 14 | use gpio::{Level, Output}; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 16 | ||
| 17 | type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>; | 17 | type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>; |
| @@ -21,7 +21,7 @@ static LED: LedType = Mutex::new(None); | |||
| 21 | async fn main(spawner: Spawner) { | 21 | async fn main(spawner: Spawner) { |
| 22 | let p = embassy_rp::init(Default::default()); | 22 | let p = embassy_rp::init(Default::default()); |
| 23 | // set the content of the global LED reference to the real LED pin | 23 | // set the content of the global LED reference to the real LED pin |
| 24 | let led = Output::new(AnyPin::from(p.PIN_25), Level::High); | 24 | let led = Output::new(p.PIN_25, Level::High); |
| 25 | // inner scope is so that once the mutex is written to, the MutexGuard is dropped, thus the | 25 | // inner scope is so that once the mutex is written to, the MutexGuard is dropped, thus the |
| 26 | // Mutex is released | 26 | // Mutex is released |
| 27 | { | 27 | { |
