From 43462947edd69b54da775c690d7e1e28adb9580c Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 14 Mar 2023 17:27:40 +0100 Subject: [PATCH] stm32: remove unused embedded-storage-async. --- embassy-stm32/Cargo.toml | 3 +-- embassy-stm32/src/flash/mod.rs | 43 ---------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 82b1ba3a0..1f430c7c6 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -49,7 +49,6 @@ embedded-hal-async = { version = "=0.2.0-alpha.0", optional = true} embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true} embedded-storage = "0.3.0" -embedded-storage-async = { version = "0.3.0", optional = true } defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } @@ -96,7 +95,7 @@ time-driver-tim12 = ["_time-driver"] time-driver-tim15 = ["_time-driver"] # Enable nightly-only features -nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] +nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] # Reexport stm32-metapac at `embassy_stm32::pac`. # This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. diff --git a/embassy-stm32/src/flash/mod.rs b/embassy-stm32/src/flash/mod.rs index 988cf9fae..b7166a437 100644 --- a/embassy-stm32/src/flash/mod.rs +++ b/embassy-stm32/src/flash/mod.rs @@ -135,46 +135,3 @@ impl<'d> NorFlash for Flash<'d> { self.blocking_write(offset, bytes) } } - -/* -cfg_if::cfg_if! { - if #[cfg(feature = "nightly")] - { - use embedded_storage_async::nor_flash::{AsyncNorFlash, AsyncReadNorFlash}; - use core::future::Future; - - impl<'d> AsyncNorFlash for Flash<'d> { - const WRITE_SIZE: usize = ::WRITE_SIZE; - const ERASE_SIZE: usize = ::ERASE_SIZE; - - type WriteFuture<'a> = impl Future> + 'a where Self: 'a; - fn write<'a>(&'a mut self, offset: u32, data: &'a [u8]) -> Self::WriteFuture<'a> { - async move { - todo!() - } - } - - type EraseFuture<'a> = impl Future> + 'a where Self: 'a; - fn erase<'a>(&'a mut self, from: u32, to: u32) -> Self::EraseFuture<'a> { - async move { - todo!() - } - } - } - - impl<'d> AsyncReadNorFlash for Flash<'d> { - const READ_SIZE: usize = ::READ_SIZE; - type ReadFuture<'a> = impl Future> + 'a where Self: 'a; - fn read<'a>(&'a mut self, address: u32, data: &'a mut [u8]) -> Self::ReadFuture<'a> { - async move { - todo!() - } - } - - fn capacity(&self) -> usize { - FLASH_SIZE - } - } - } -} -*/