From 0ddabf04234ca8ad877d6ae13cc690567d6f4832 Mon Sep 17 00:00:00 2001 From: dev-guruprasath <96348958+dev-guruprasath@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:37:01 +0530 Subject: [PATCH] changed ADDR variable to addr --- examples/stm32g0/src/bin/flash.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/stm32g0/src/bin/flash.rs b/examples/stm32g0/src/bin/flash.rs index a4d131cd..ed9f2e84 100644 --- a/examples/stm32g0/src/bin/flash.rs +++ b/examples/stm32g0/src/bin/flash.rs @@ -18,19 +18,19 @@ async fn main(_spawner: Spawner) { info!("Reading..."); let mut buf = [0u8; 32]; - unwrap!(f.blocking_read(ADDR, &mut buf)); + unwrap!(f.blocking_read(addr, &mut buf)); info!("Read: {=[u8]:x}", buf); info!("Erasing..."); - unwrap!(f.blocking_erase(ADDR, ADDR + 2 * 1024)); + unwrap!(f.blocking_erase(addr, addr + 2 * 1024)); info!("Reading..."); let mut buf = [0u8; 32]; - unwrap!(f.blocking_read(ADDR, &mut buf)); + unwrap!(f.blocking_read(addr, &mut buf)); info!("Read after erase: {=[u8]:x}", buf); info!("Writing..."); unwrap!(f.blocking_write( - ADDR, + addr, &[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 @@ -39,6 +39,6 @@ async fn main(_spawner: Spawner) { info!("Reading..."); let mut buf = [0u8; 32]; - unwrap!(f.blocking_read(ADDR, &mut buf)); + unwrap!(f.blocking_read(addr, &mut buf)); info!("Read: {=[u8]:x}", buf); }