diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modules/ROOT/examples/basic/src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/modules/ROOT/examples/basic/src/main.rs b/docs/modules/ROOT/examples/basic/src/main.rs index 2a9b1facc..8394f73b7 100644 --- a/docs/modules/ROOT/examples/basic/src/main.rs +++ b/docs/modules/ROOT/examples/basic/src/main.rs | |||
| @@ -14,14 +14,13 @@ use embassy_nrf::{ | |||
| 14 | peripherals::P0_13, | 14 | peripherals::P0_13, |
| 15 | Peripherals, | 15 | Peripherals, |
| 16 | }; | 16 | }; |
| 17 | use embedded_hal::digital::v2::OutputPin; | ||
| 18 | 17 | ||
| 19 | #[embassy::task] | 18 | #[embassy::task] |
| 20 | async fn blinker(mut led: Output<'static, P0_13>, interval: Duration) { | 19 | async fn blinker(mut led: Output<'static, P0_13>, interval: Duration) { |
| 21 | loop { | 20 | loop { |
| 22 | unwrap!(led.set_high()); | 21 | led.set_high(); |
| 23 | Timer::after(interval).await; | 22 | Timer::after(interval).await; |
| 24 | unwrap!(led.set_low()); | 23 | led.set_low(); |
| 25 | Timer::after(interval).await; | 24 | Timer::after(interval).await; |
| 26 | } | 25 | } |
| 27 | } | 26 | } |
