diff options
| author | Dion Dokter <[email protected]> | 2025-04-29 17:05:07 +0200 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2025-04-29 17:05:07 +0200 |
| commit | 34a4dddfe79e55057c2ce87ee60b1c6b93c5ac76 (patch) | |
| tree | c6ba4604aeb3028f9cf53e037cf4ae524c65db39 | |
| parent | a1081f29bfa0bc0940b55d7d249d9cb76c2d2e23 (diff) | |
Add L4+ support
| -rw-r--r-- | embassy-stm32/src/flash/l.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy-stm32/src/flash/l.rs b/embassy-stm32/src/flash/l.rs index bc6f8c873..3b62fa2ee 100644 --- a/embassy-stm32/src/flash/l.rs +++ b/embassy-stm32/src/flash/l.rs | |||
| @@ -248,3 +248,13 @@ pub(crate) fn check_bank_setup() { | |||
| 248 | panic!("Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the dbank value in the user option bytes or configure embassy to use single-bank config"); | 248 | panic!("Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the dbank value in the user option bytes or configure embassy to use single-bank config"); |
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | |||
| 252 | #[cfg(all(bank_setup_configurable, flash_l4))] | ||
| 253 | pub(crate) fn check_bank_setup() { | ||
| 254 | if cfg!(feature = "single-bank") && pac::FLASH.optr().read().dualbank() { | ||
| 255 | panic!("Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the dualbank value in the user option bytes or configure embassy to use dual-bank config"); | ||
| 256 | } | ||
| 257 | if cfg!(feature = "dual-bank") && !pac::FLASH.optr().read().dualbank() { | ||
| 258 | panic!("Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the dualbank value in the user option bytes or configure embassy to use single-bank config"); | ||
| 259 | } | ||
| 260 | } | ||
