aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/flash/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32/src/flash/mod.rs')
-rw-r--r--embassy-stm32/src/flash/mod.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/embassy-stm32/src/flash/mod.rs b/embassy-stm32/src/flash/mod.rs
index adc45db9c..a3f9e00f7 100644
--- a/embassy-stm32/src/flash/mod.rs
+++ b/embassy-stm32/src/flash/mod.rs
@@ -5,13 +5,20 @@ use embedded_storage::nor_flash::{NorFlashError, NorFlashErrorKind};
5mod asynch; 5mod asynch;
6#[cfg(flash)] 6#[cfg(flash)]
7mod common; 7mod common;
8#[cfg(eeprom)]
9mod eeprom;
8 10
9#[cfg(flash_f4)] 11#[cfg(flash_f4)]
10pub use asynch::InterruptHandler; 12pub use asynch::InterruptHandler;
11#[cfg(flash)] 13#[cfg(flash)]
12pub use common::*; 14pub use common::*;
15#[cfg(eeprom)]
16#[allow(unused_imports)]
17pub use eeprom::*;
13 18
14pub use crate::_generated::flash_regions::*; 19pub use crate::_generated::flash_regions::*;
20#[cfg(eeprom)]
21pub use crate::_generated::{EEPROM_BASE, EEPROM_SIZE};
15pub use crate::_generated::{FLASH_BASE, FLASH_SIZE, MAX_ERASE_SIZE, WRITE_SIZE}; 22pub use crate::_generated::{FLASH_BASE, FLASH_SIZE, MAX_ERASE_SIZE, WRITE_SIZE};
16 23
17/// Get all flash regions. 24/// Get all flash regions.
@@ -83,7 +90,8 @@ pub enum FlashBank {
83 /// OTP region, 90 /// OTP region,
84 Otp, 91 Otp,
85} 92}
86 93#[cfg(all(eeprom, not(any(flash_l0, flash_l1))))]
94compile_error!("The 'eeprom' cfg is enabled for a non-L0/L1 chip family. This is an unsupported configuration.");
87#[cfg_attr(any(flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb), path = "l.rs")] 95#[cfg_attr(any(flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb), path = "l.rs")]
88#[cfg_attr(flash_f0, path = "f0.rs")] 96#[cfg_attr(flash_f0, path = "f0.rs")]
89#[cfg_attr(any(flash_f1, flash_f3), path = "f1f3.rs")] 97#[cfg_attr(any(flash_f1, flash_f3), path = "f1f3.rs")]