diff options
| author | Adam Greig <[email protected]> | 2023-10-15 00:57:25 +0100 |
|---|---|---|
| committer | Adam Greig <[email protected]> | 2023-10-15 01:30:12 +0100 |
| commit | 0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch) | |
| tree | f6caefe939109e55a73e9141c736d2f6c20f51e8 /examples/rp/src/bin/gpout.rs | |
| parent | 7559f9e5834799b041d899767ef4305dcfdf0181 (diff) | |
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/rp/src/bin/gpout.rs')
| -rw-r--r-- | examples/rp/src/bin/gpout.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rp/src/bin/gpout.rs b/examples/rp/src/bin/gpout.rs index 0a3b5fa98..896cc15ee 100644 --- a/examples/rp/src/bin/gpout.rs +++ b/examples/rp/src/bin/gpout.rs | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::clocks; | 11 | use embassy_rp::clocks; |
| 12 | use embassy_time::{Duration, Timer}; | 12 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 14 | ||
| 15 | #[embassy_executor::main] | 15 | #[embassy_executor::main] |
| @@ -26,13 +26,13 @@ async fn main(_spawner: Spawner) { | |||
| 26 | "Pin 25 is now outputing CLK_SYS/1000, should be toggling at {}", | 26 | "Pin 25 is now outputing CLK_SYS/1000, should be toggling at {}", |
| 27 | gpout3.get_freq() | 27 | gpout3.get_freq() |
| 28 | ); | 28 | ); |
| 29 | Timer::after(Duration::from_secs(2)).await; | 29 | Timer::after_secs(2).await; |
| 30 | 30 | ||
| 31 | gpout3.set_src(clocks::GpoutSrc::Ref); | 31 | gpout3.set_src(clocks::GpoutSrc::Ref); |
| 32 | info!( | 32 | info!( |
| 33 | "Pin 25 is now outputing CLK_REF/1000, should be toggling at {}", | 33 | "Pin 25 is now outputing CLK_REF/1000, should be toggling at {}", |
| 34 | gpout3.get_freq() | 34 | gpout3.get_freq() |
| 35 | ); | 35 | ); |
| 36 | Timer::after(Duration::from_secs(2)).await; | 36 | Timer::after_secs(2).await; |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
