aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f4/src/bin/flash.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32f4/src/bin/flash.rs')
-rw-r--r--examples/stm32f4/src/bin/flash.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/stm32f4/src/bin/flash.rs b/examples/stm32f4/src/bin/flash.rs
index 93c54e943..1e8cabab4 100644
--- a/examples/stm32f4/src/bin/flash.rs
+++ b/examples/stm32f4/src/bin/flash.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;
@@ -31,7 +30,7 @@ fn test_flash(f: &mut Flash<'_, Blocking>, offset: u32, size: u32) {
31 30
32 info!("Reading..."); 31 info!("Reading...");
33 let mut buf = [0u8; 32]; 32 let mut buf = [0u8; 32];
34 unwrap!(f.read(offset, &mut buf)); 33 unwrap!(f.blocking_read(offset, &mut buf));
35 info!("Read: {=[u8]:x}", buf); 34 info!("Read: {=[u8]:x}", buf);
36 35
37 info!("Erasing..."); 36 info!("Erasing...");
@@ -39,7 +38,7 @@ fn test_flash(f: &mut Flash<'_, Blocking>, offset: u32, size: u32) {
39 38
40 info!("Reading..."); 39 info!("Reading...");
41 let mut buf = [0u8; 32]; 40 let mut buf = [0u8; 32];
42 unwrap!(f.read(offset, &mut buf)); 41 unwrap!(f.blocking_read(offset, &mut buf));
43 info!("Read after erase: {=[u8]:x}", buf); 42 info!("Read after erase: {=[u8]:x}", buf);
44 43
45 info!("Writing..."); 44 info!("Writing...");
@@ -53,7 +52,7 @@ fn test_flash(f: &mut Flash<'_, Blocking>, offset: u32, size: u32) {
53 52
54 info!("Reading..."); 53 info!("Reading...");
55 let mut buf = [0u8; 32]; 54 let mut buf = [0u8; 32];
56 unwrap!(f.read(offset, &mut buf)); 55 unwrap!(f.blocking_read(offset, &mut buf));
57 info!("Read: {=[u8]:x}", buf); 56 info!("Read: {=[u8]:x}", buf);
58 assert_eq!( 57 assert_eq!(
59 &buf[..], 58 &buf[..],