diff options
author | Ulf Lilleengen <ulf.lilleengen@gmail.com> | 2022-01-27 17:43:08 +0100 |
---|---|---|
committer | Ulf Lilleengen <ulf.lilleengen@gmail.com> | 2022-01-27 17:45:02 +0100 |
commit | 3d11b70e5e64df4a583238ce37647e531930668a (patch) | |
tree | 741ead6693652f7388a99f36617f68fc4c68bf71 /examples | |
parent | 6e196a3c48857aba00ff400e4e31e730faab20b1 (diff) | |
download | nrf-softdevice-3d11b70e5e64df4a583238ce37647e531930668a.zip |
Migrate do embedded-storage-async
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Cargo.toml | 2 | ||||
-rw-r--r-- | examples/src/bin/flash.rs | 4 |
2 files changed, 4 insertions, 2 deletions
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"); |