aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin/flash_async.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f4/src/bin/flash_async.rs')
-rw-r--r--examples/stm32f4/src/bin/flash_async.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/stm32f4/src/bin/flash_async.rs b/examples/stm32f4/src/bin/flash_async.rs
index f0a65a725..493a536f3 100644
--- a/examples/stm32f4/src/bin/flash_async.rs
+++ b/examples/stm32f4/src/bin/flash_async.rs
@@ -1,6 +1,5 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::{info, unwrap}; 4use defmt::{info, unwrap};
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
@@ -48,7 +47,7 @@ async fn test_flash<'a>(f: &mut Flash<'a>, offset: u32, size: u32) {
48 47
49 info!("Reading..."); 48 info!("Reading...");
50 let mut buf = [0u8; 32]; 49 let mut buf = [0u8; 32];
51 unwrap!(f.read(offset, &mut buf)); 50 unwrap!(f.blocking_read(offset, &mut buf));
52 info!("Read: {=[u8]:x}", buf); 51 info!("Read: {=[u8]:x}", buf);
53 52
54 info!("Erasing..."); 53 info!("Erasing...");
@@ -56,7 +55,7 @@ async fn test_flash<'a>(f: &mut Flash<'a>, offset: u32, size: u32) {
56 55
57 info!("Reading..."); 56 info!("Reading...");
58 let mut buf = [0u8; 32]; 57 let mut buf = [0u8; 32];
59 unwrap!(f.read(offset, &mut buf)); 58 unwrap!(f.blocking_read(offset, &mut buf));
60 info!("Read after erase: {=[u8]:x}", buf); 59 info!("Read after erase: {=[u8]:x}", buf);
61 60
62 info!("Writing..."); 61 info!("Writing...");
@@ -73,7 +72,7 @@ async fn test_flash<'a>(f: &mut Flash<'a>, offset: u32, size: u32) {
73 72
74 info!("Reading..."); 73 info!("Reading...");
75 let mut buf = [0u8; 32]; 74 let mut buf = [0u8; 32];
76 unwrap!(f.read(offset, &mut buf)); 75 unwrap!(f.blocking_read(offset, &mut buf));
77 info!("Read: {=[u8]:x}", buf); 76 info!("Read: {=[u8]:x}", buf);
78 assert_eq!( 77 assert_eq!(
79 &buf[..], 78 &buf[..],