mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 06:40:32 +00:00
Add support for g0
This commit is contained in:
parent
a41c83d182
commit
b967aaf7cc
@ -110,7 +110,7 @@ fn wait_busy() {
|
|||||||
while pac::FLASH.sr().read().bsy() {}
|
while pac::FLASH.sr().read().bsy() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(bank_setup_configurable)]
|
#[cfg(all(bank_setup_configurable, any(flash_g4c2, flash_g4c3, flash_g4c4)))]
|
||||||
pub(crate) fn check_bank_setup() {
|
pub(crate) fn check_bank_setup() {
|
||||||
if cfg!(feature = "single-bank") && pac::FLASH.optr().read().dbank() {
|
if cfg!(feature = "single-bank") && pac::FLASH.optr().read().dbank() {
|
||||||
panic!("Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the dbank value in the user option bytes or configure embassy to use dual-bank config");
|
panic!("Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the dbank value in the user option bytes or configure embassy to use dual-bank config");
|
||||||
@ -119,3 +119,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");
|
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_g0x1))]
|
||||||
|
pub(crate) fn check_bank_setup() {
|
||||||
|
if cfg!(feature = "single-bank") && pac::FLASH.optr().read().dual_bank() {
|
||||||
|
panic!("Embassy is configured as single-bank, but the hardware is running in dual-bank mode. Change the hardware by changing the dual_bank value in the user option bytes or configure embassy to use dual-bank config");
|
||||||
|
}
|
||||||
|
if cfg!(feature = "dual-bank") && !pac::FLASH.optr().read().dual_bank() {
|
||||||
|
panic!("Embassy is configured as dual-bank, but the hardware is running in single-bank mode. Change the hardware by changing the dual_bank value in the user option bytes or configure embassy to use single-bank config");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user