diff options
Diffstat (limited to 'embassy-stm32/src/flash/f7.rs')
| -rw-r--r-- | embassy-stm32/src/flash/f7.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/embassy-stm32/src/flash/f7.rs b/embassy-stm32/src/flash/f7.rs index 0547c747a..09389c417 100644 --- a/embassy-stm32/src/flash/f7.rs +++ b/embassy-stm32/src/flash/f7.rs | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | use core::ptr::write_volatile; | 1 | use core::ptr::write_volatile; |
| 2 | use core::sync::atomic::{fence, Ordering}; | 2 | use core::sync::atomic::{Ordering, fence}; |
| 3 | 3 | ||
| 4 | use super::{FlashSector, WRITE_SIZE}; | 4 | use super::{FlashSector, WRITE_SIZE}; |
| 5 | use crate::flash::Error; | 5 | use crate::flash::Error; |
| @@ -99,7 +99,7 @@ unsafe fn blocking_wait_ready() -> Result<(), Error> { | |||
| 99 | #[cfg(test)] | 99 | #[cfg(test)] |
| 100 | mod tests { | 100 | mod tests { |
| 101 | use super::*; | 101 | use super::*; |
| 102 | use crate::flash::{get_sector, FlashBank}; | 102 | use crate::flash::{FlashBank, get_sector}; |
| 103 | 103 | ||
| 104 | #[test] | 104 | #[test] |
| 105 | #[cfg(stm32f732)] | 105 | #[cfg(stm32f732)] |
| @@ -218,9 +218,13 @@ mod tests { | |||
| 218 | #[cfg(all(bank_setup_configurable))] | 218 | #[cfg(all(bank_setup_configurable))] |
| 219 | pub(crate) fn check_bank_setup() { | 219 | pub(crate) fn check_bank_setup() { |
| 220 | if cfg!(feature = "single-bank") && !pac::FLASH.optcr().read().n_dbank() { | 220 | if cfg!(feature = "single-bank") && !pac::FLASH.optcr().read().n_dbank() { |
| 221 | panic!("Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the ndbank value in the user option bytes or configure embassy to use dual-bank config"); | 221 | panic!( |
| 222 | "Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the ndbank value in the user option bytes or configure embassy to use dual-bank config" | ||
| 223 | ); | ||
| 222 | } | 224 | } |
| 223 | if cfg!(feature = "dual-bank") && pac::FLASH.optcr().read().n_dbank() { | 225 | if cfg!(feature = "dual-bank") && pac::FLASH.optcr().read().n_dbank() { |
| 224 | panic!("Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the ndbank value in the user option bytes or configure embassy to use single-bank config"); | 226 | panic!( |
| 227 | "Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the ndbank value in the user option bytes or configure embassy to use single-bank config" | ||
| 228 | ); | ||
| 225 | } | 229 | } |
| 226 | } | 230 | } |
