aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-03-14 16:28:47 +0000
committerGitHub <[email protected]>2023-03-14 16:28:47 +0000
commite9a161b4624e7771f5b9dde04feb7d25ba21e0fa (patch)
tree8f6136a7d1397258a47b04c136ddb634be355402
parente73c6c9d9004b09529e94ce3c979d19d66b08206 (diff)
parent43462947edd69b54da775c690d7e1e28adb9580c (diff)
Merge #1279
1279: stm32: remove unused embedded-storage-async. r=Dirbaio a=Dirbaio bors r+ Co-authored-by: Dario Nieuwenhuis <[email protected]>
-rw-r--r--embassy-stm32/Cargo.toml3
-rw-r--r--embassy-stm32/src/flash/mod.rs43
2 files changed, 1 insertions, 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}
49embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true} 49embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true}
50 50
51embedded-storage = "0.3.0" 51embedded-storage = "0.3.0"
52embedded-storage-async = { version = "0.3.0", optional = true }
53 52
54defmt = { version = "0.3", optional = true } 53defmt = { version = "0.3", optional = true }
55log = { version = "0.4.14", optional = true } 54log = { version = "0.4.14", optional = true }
@@ -96,7 +95,7 @@ time-driver-tim12 = ["_time-driver"]
96time-driver-tim15 = ["_time-driver"] 95time-driver-tim15 = ["_time-driver"]
97 96
98# Enable nightly-only features 97# Enable nightly-only features
99nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] 98nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"]
100 99
101# Reexport stm32-metapac at `embassy_stm32::pac`. 100# Reexport stm32-metapac at `embassy_stm32::pac`.
102# This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. 101# 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> {
135 self.blocking_write(offset, bytes) 135 self.blocking_write(offset, bytes)
136 } 136 }
137} 137}
138
139/*
140cfg_if::cfg_if! {
141 if #[cfg(feature = "nightly")]
142 {
143 use embedded_storage_async::nor_flash::{AsyncNorFlash, AsyncReadNorFlash};
144 use core::future::Future;
145
146 impl<'d> AsyncNorFlash for Flash<'d> {
147 const WRITE_SIZE: usize = <Self as NorFlash>::WRITE_SIZE;
148 const ERASE_SIZE: usize = <Self as NorFlash>::ERASE_SIZE;
149
150 type WriteFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a;
151 fn write<'a>(&'a mut self, offset: u32, data: &'a [u8]) -> Self::WriteFuture<'a> {
152 async move {
153 todo!()
154 }
155 }
156
157 type EraseFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a;
158 fn erase<'a>(&'a mut self, from: u32, to: u32) -> Self::EraseFuture<'a> {
159 async move {
160 todo!()
161 }
162 }
163 }
164
165 impl<'d> AsyncReadNorFlash for Flash<'d> {
166 const READ_SIZE: usize = <Self as ReadNorFlash>::READ_SIZE;
167 type ReadFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a;
168 fn read<'a>(&'a mut self, address: u32, data: &'a mut [u8]) -> Self::ReadFuture<'a> {
169 async move {
170 todo!()
171 }
172 }
173
174 fn capacity(&self) -> usize {
175 FLASH_SIZE
176 }
177 }
178 }
179}
180*/