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/flash.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/flash.rs')
| -rw-r--r-- | examples/rp/src/bin/flash.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rp/src/bin/flash.rs b/examples/rp/src/bin/flash.rs index 911a657eb..129a8497f 100644 --- a/examples/rp/src/bin/flash.rs +++ b/examples/rp/src/bin/flash.rs | |||
| @@ -8,7 +8,7 @@ use defmt::*; | |||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE}; | 9 | use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE}; |
| 10 | use embassy_rp::peripherals::FLASH; | 10 | use embassy_rp::peripherals::FLASH; |
| 11 | use embassy_time::{Duration, Timer}; | 11 | use embassy_time::Timer; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 13 | ||
| 14 | const ADDR_OFFSET: u32 = 0x100000; | 14 | const ADDR_OFFSET: u32 = 0x100000; |
| @@ -23,7 +23,7 @@ async fn main(_spawner: Spawner) { | |||
| 23 | // defmt RTT header. Reading that header might touch flash memory, which | 23 | // defmt RTT header. Reading that header might touch flash memory, which |
| 24 | // interferes with flash write operations. | 24 | // interferes with flash write operations. |
| 25 | // https://github.com/knurling-rs/defmt/pull/683 | 25 | // https://github.com/knurling-rs/defmt/pull/683 |
| 26 | Timer::after(Duration::from_millis(10)).await; | 26 | Timer::after_millis(10).await; |
| 27 | 27 | ||
| 28 | let mut flash = embassy_rp::flash::Flash::<_, Async, FLASH_SIZE>::new(p.FLASH, p.DMA_CH0); | 28 | let mut flash = embassy_rp::flash::Flash::<_, Async, FLASH_SIZE>::new(p.FLASH, p.DMA_CH0); |
| 29 | 29 | ||
