Skip to content

Commit 2a542bc

Browse files
committed
feat: support multiwrite flash traits if configured
1 parent c0cfd68 commit 2a542bc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

embassy-nrf/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ nfc-pins-as-gpio = []
6464
# nrf52820, nrf52833, nrf52840: P0_18
6565
reset-pin-as-gpio = []
6666

67+
# Implements the MultiwriteNorFlash trait for QSPI. Should only be enabled if your external
68+
# flash supports the semantics described in
69+
# https://docs.rs/embedded-storage/0.3.1/embedded_storage/nor_flash/trait.MultiwriteNorFlash.html
70+
qspi-multiwrite-flash = []
71+
6772
# Features starting with `_` are for internal use only. They're not intended
6873
# to be enabled by other crates, and are not covered by semver guarantees.
6974

embassy-nrf/src/qspi.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ impl<'d, T: Instance> NorFlash for Qspi<'d, T> {
605605
}
606606
}
607607

608+
#[cfg(feature = "qspi-multiwrite-flash")]
609+
impl<'d, T: Instance> embedded_storage::nor_flash::MultiwriteNorFlash for Qspi<'d, T> {}
610+
608611
mod _eh1 {
609612
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
610613

0 commit comments

Comments
 (0)