diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 6d7440519..970f62b0c 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -64,6 +64,11 @@ nfc-pins-as-gpio = [] # nrf52820, nrf52833, nrf52840: P0_18 reset-pin-as-gpio = [] +# Implements the MultiwriteNorFlash trait for QSPI. Should only be enabled if your external +# flash supports the semantics described in +# https://docs.rs/embedded-storage/0.3.1/embedded_storage/nor_flash/trait.MultiwriteNorFlash.html +qspi-multiwrite-flash = [] + # Features starting with `_` are for internal use only. They're not intended # to be enabled by other crates, and are not covered by semver guarantees. diff --git a/embassy-nrf/src/qspi.rs b/embassy-nrf/src/qspi.rs index 5e1a4e842..f35b83628 100755 --- a/embassy-nrf/src/qspi.rs +++ b/embassy-nrf/src/qspi.rs @@ -605,6 +605,9 @@ impl<'d, T: Instance> NorFlash for Qspi<'d, T> { } } +#[cfg(feature = "qspi-multiwrite-flash")] +impl<'d, T: Instance> embedded_storage::nor_flash::MultiwriteNorFlash for Qspi<'d, T> {} + mod _eh1 { use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};