From 3d11b70e5e64df4a583238ce37647e531930668a Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Thu, 27 Jan 2022 17:43:08 +0100 Subject: Migrate do embedded-storage-async --- examples/Cargo.toml | 2 ++ examples/src/bin/flash.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 995b6f4..4d56e3c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -26,6 +26,8 @@ nrf-softdevice-defmt-rtt = { path = "../nrf-softdevice-defmt-rtt", version = "0. panic-probe = { version = "0.3", features= ["print-defmt"] } nrf-softdevice = { version = "0.1.0", path = "../nrf-softdevice", features = ["defmt", "nrf52840", "s140", "ble-peripheral", "ble-central", "critical-section-impl"] } nrf-softdevice-s140 = { version = "0.1.1", path = "../nrf-softdevice-s140" } +embedded-storage = { git = "https://github.com/embassy-rs/embedded-storage.git", branch = "embassy" } +embedded-storage-async = { git = "https://github.com/embassy-rs/embedded-storage.git", branch = "embassy" } futures = { version = "0.3.5", default-features = false } fixed = "1.2.0" heapless = "0.7.1" diff --git a/examples/src/bin/flash.rs b/examples/src/bin/flash.rs index a5b2fac..2017e86 100644 --- a/examples/src/bin/flash.rs +++ b/examples/src/bin/flash.rs @@ -10,8 +10,8 @@ mod example_common; use cortex_m_rt::entry; use defmt::*; use embassy::executor::Executor; -use embassy::traits::flash::Flash as _; use embassy::util::Forever; +use embedded_storage_async::nor_flash::*; use futures::pin_mut; use nrf_softdevice::{Flash, Softdevice}; @@ -29,7 +29,7 @@ async fn flash_task(sd: &'static Softdevice) { pin_mut!(f); info!("starting erase"); - unwrap!(f.as_mut().erase(0x80000).await); + unwrap!(f.as_mut().erase(0x80000, 0x81000).await); info!("erased!"); info!("starting write"); -- cgit v1.2.3