diff options
| author | okhsunrog <[email protected]> | 2025-05-21 00:44:24 +0300 |
|---|---|---|
| committer | okhsunrog <[email protected]> | 2025-05-21 00:44:24 +0300 |
| commit | d335e309012020b5eab6f0d04ee63053365140ea (patch) | |
| tree | 436b220907ae27951b725bc62f1b89a573397bb4 /embassy-stm32/src/flash | |
| parent | c9f0afa494636533c838473bcb5d27ff8f011fb7 (diff) | |
only support eeprom for l0 and l1
Diffstat (limited to 'embassy-stm32/src/flash')
| -rw-r--r-- | embassy-stm32/src/flash/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-stm32/src/flash/mod.rs b/embassy-stm32/src/flash/mod.rs index ab956664b..26f357370 100644 --- a/embassy-stm32/src/flash/mod.rs +++ b/embassy-stm32/src/flash/mod.rs | |||
| @@ -12,9 +12,9 @@ pub use asynch::InterruptHandler; | |||
| 12 | pub use common::*; | 12 | pub use common::*; |
| 13 | 13 | ||
| 14 | pub use crate::_generated::flash_regions::*; | 14 | pub use crate::_generated::flash_regions::*; |
| 15 | pub use crate::_generated::{FLASH_BASE, FLASH_SIZE, MAX_ERASE_SIZE, WRITE_SIZE}; | ||
| 16 | #[cfg(eeprom)] | 15 | #[cfg(eeprom)] |
| 17 | pub use crate::_generated::{EEPROM_BASE, EEPROM_SIZE}; | 16 | pub use crate::_generated::{EEPROM_BASE, EEPROM_SIZE}; |
| 17 | pub use crate::_generated::{FLASH_BASE, FLASH_SIZE, MAX_ERASE_SIZE, WRITE_SIZE}; | ||
| 18 | 18 | ||
| 19 | /// Get all flash regions. | 19 | /// Get all flash regions. |
| 20 | pub fn get_flash_regions() -> &'static [&'static FlashRegion] { | 20 | pub fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| @@ -85,7 +85,8 @@ pub enum FlashBank { | |||
| 85 | /// OTP region, | 85 | /// OTP region, |
| 86 | Otp, | 86 | Otp, |
| 87 | } | 87 | } |
| 88 | 88 | #[cfg(all(eeprom, not(any(flash_l0, flash_l1))))] | |
| 89 | compile_error!("The 'eeprom' cfg is enabled for a non-L0/L1 chip family. This is an unsupported configuration."); | ||
| 89 | #[cfg_attr(any(flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb), path = "l.rs")] | 90 | #[cfg_attr(any(flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb), path = "l.rs")] |
| 90 | #[cfg_attr(flash_f0, path = "f0.rs")] | 91 | #[cfg_attr(flash_f0, path = "f0.rs")] |
| 91 | #[cfg_attr(any(flash_f1, flash_f3), path = "f1f3.rs")] | 92 | #[cfg_attr(any(flash_f1, flash_f3), path = "f1f3.rs")] |
