diff options
Diffstat (limited to 'embassy-stm32/src/flash/mod.rs')
| -rw-r--r-- | embassy-stm32/src/flash/mod.rs | 10 |
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}; | |||
| 5 | mod asynch; | 5 | mod asynch; |
| 6 | #[cfg(flash)] | 6 | #[cfg(flash)] |
| 7 | mod common; | 7 | mod common; |
| 8 | #[cfg(eeprom)] | ||
| 9 | mod eeprom; | ||
| 8 | 10 | ||
| 9 | #[cfg(flash_f4)] | 11 | #[cfg(flash_f4)] |
| 10 | pub use asynch::InterruptHandler; | 12 | pub use asynch::InterruptHandler; |
| 11 | #[cfg(flash)] | 13 | #[cfg(flash)] |
| 12 | pub use common::*; | 14 | pub use common::*; |
| 15 | #[cfg(eeprom)] | ||
| 16 | #[allow(unused_imports)] | ||
| 17 | pub use eeprom::*; | ||
| 13 | 18 | ||
| 14 | pub use crate::_generated::flash_regions::*; | 19 | pub use crate::_generated::flash_regions::*; |
| 20 | #[cfg(eeprom)] | ||
| 21 | pub use crate::_generated::{EEPROM_BASE, EEPROM_SIZE}; | ||
| 15 | pub use crate::_generated::{FLASH_BASE, FLASH_SIZE, MAX_ERASE_SIZE, WRITE_SIZE}; | 22 | pub 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))))] | |
| 94 | compile_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")] |
