aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f7/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 /examples/stm32f7/src/bin/flash.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/stm32f7/src/bin/flash.rs')
-rw-r--r--examples/stm32f7/src/bin/flash.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f7/src/bin/flash.rs b/examples/stm32f7/src/bin/flash.rs
index 35d3059be..06a94f1c8 100644
--- a/examples/stm32f7/src/bin/flash.rs
+++ b/examples/stm32f7/src/bin/flash.rs
@@ -5,7 +5,7 @@
5use defmt::{info, unwrap}; 5use defmt::{info, unwrap};
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::flash::Flash; 7use embassy_stm32::flash::Flash;
8use embassy_time::{Duration, Timer}; 8use embassy_time::Timer;
9use {defmt_rtt as _, panic_probe as _}; 9use {defmt_rtt as _, panic_probe as _};
10 10
11#[embassy_executor::main] 11#[embassy_executor::main]
@@ -16,7 +16,7 @@ async fn main(_spawner: Spawner) {
16 const ADDR: u32 = 0x8_0000; // This is the offset into the third region, the absolute address is 4x32K + 128K + 0x8_0000. 16 const ADDR: u32 = 0x8_0000; // This is the offset into the third region, the absolute address is 4x32K + 128K + 0x8_0000.
17 17
18 // wait a bit before accessing the flash 18 // wait a bit before accessing the flash
19 Timer::after(Duration::from_millis(300)).await; 19 Timer::after_millis(300).await;
20 20
21 let mut f = Flash::new_blocking(p.FLASH).into_blocking_regions().bank1_region3; 21 let mut f = Flash::new_blocking(p.FLASH).into_blocking_regions().bank1_region3;
22 22