aboutsummaryrefslogtreecommitdiff
path: root/tests/rp/src/bin/flash.rs
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2023-10-15 00:57:25 +0100
committerAdam Greig <[email protected]>2023-10-15 01:30:12 +0100
commit0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch)
treef6caefe939109e55a73e9141c736d2f6c20f51e8 /tests/rp/src/bin/flash.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'tests/rp/src/bin/flash.rs')
-rw-r--r--tests/rp/src/bin/flash.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/rp/src/bin/flash.rs b/tests/rp/src/bin/flash.rs
index 75be2bf06..2d85135de 100644
--- a/tests/rp/src/bin/flash.rs
+++ b/tests/rp/src/bin/flash.rs
@@ -6,7 +6,7 @@ teleprobe_meta::target!(b"rpi-pico");
6use defmt::*; 6use defmt::*;
7use embassy_executor::Spawner; 7use embassy_executor::Spawner;
8use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE}; 8use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE};
9use embassy_time::{Duration, Timer}; 9use embassy_time::Timer;
10use {defmt_rtt as _, panic_probe as _}; 10use {defmt_rtt as _, panic_probe as _};
11 11
12const ADDR_OFFSET: u32 = 0x8000; 12const ADDR_OFFSET: u32 = 0x8000;
@@ -20,7 +20,7 @@ async fn main(_spawner: Spawner) {
20 // defmt RTT header. Reading that header might touch flash memory, which 20 // defmt RTT header. Reading that header might touch flash memory, which
21 // interferes with flash write operations. 21 // interferes with flash write operations.
22 // https://github.com/knurling-rs/defmt/pull/683 22 // https://github.com/knurling-rs/defmt/pull/683
23 Timer::after(Duration::from_millis(10)).await; 23 Timer::after_millis(10).await;
24 24
25 let mut flash = embassy_rp::flash::Flash::<_, Async, { 2 * 1024 * 1024 }>::new(p.FLASH, p.DMA_CH0); 25 let mut flash = embassy_rp::flash::Flash::<_, Async, { 2 * 1024 * 1024 }>::new(p.FLASH, p.DMA_CH0);
26 26