aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f7/src
diff options
context:
space:
mode:
authorRasmus Melchior Jacobsen <[email protected]>2023-05-25 21:40:54 +0200
committerRasmus Melchior Jacobsen <[email protected]>2023-05-25 21:40:54 +0200
commit860b519f9993bd8991849c680aae058558aadfbd (patch)
treea0f815620d3be788cb69f0c97c6e42480ee24bae /examples/stm32f7/src
parent18d14dff48d1fd49cfd43fb94304bf932a74a6ca (diff)
Let Flash<Async/Blocking> be a thing
Diffstat (limited to 'examples/stm32f7/src')
-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 5507e7310..f3b667555 100644
--- a/examples/stm32f7/src/bin/flash.rs
+++ b/examples/stm32f7/src/bin/flash.rs
@@ -4,7 +4,7 @@
4 4
5use defmt::{info, unwrap}; 5use defmt::{info, unwrap};
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::{flash::Flash, interrupt}; 7use embassy_stm32::flash::Flash;
8use embassy_time::{Duration, Timer}; 8use embassy_time::{Duration, Timer};
9use {defmt_rtt as _, panic_probe as _}; 9use {defmt_rtt as _, panic_probe as _};
10 10
@@ -18,7 +18,7 @@ async fn main(_spawner: Spawner) {
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(Duration::from_millis(300)).await;
20 20
21 let mut f = Flash::new(p.FLASH, interrupt::take!(FLASH)).into_blocking_regions().bank1_region3; 21 let mut f = Flash::new_blocking(p.FLASH).into_blocking_regions().bank1_region3;
22 22
23 info!("Reading..."); 23 info!("Reading...");
24 let mut buf = [0u8; 32]; 24 let mut buf = [0u8; 32];