Add L4+ support

This commit is contained in:
Dion Dokter 2025-04-29 17:05:07 +02:00
parent a1081f29bf
commit 34a4dddfe7

View File

@ -248,3 +248,13 @@ pub(crate) fn check_bank_setup() {
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");
}
}
#[cfg(all(bank_setup_configurable, flash_l4))]
pub(crate) fn check_bank_setup() {
if cfg!(feature = "single-bank") && pac::FLASH.optr().read().dualbank() {
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");
}
if cfg!(feature = "dual-bank") && !pac::FLASH.optr().read().dualbank() {
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");
}
}