feat: support multiwrite flash traits if configured

This commit is contained in:
Ulf Lilleengen 2023-12-18 13:58:12 +01:00
parent c0cfd68c0c
commit 2a542bc143
2 changed files with 8 additions and 0 deletions

View File

@ -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.

View File

@ -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};