fix stmd g0/g4 formatting and bker bit access
This commit is contained in:
parent
c706e3797a
commit
d368760424
@ -59,6 +59,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||||||
interrupt::free(|_| {
|
interrupt::free(|_| {
|
||||||
pac::FLASH.cr().modify(|w| {
|
pac::FLASH.cr().modify(|w| {
|
||||||
w.set_per(true);
|
w.set_per(true);
|
||||||
|
#[cfg(any(flash_g0x0, flash_g0x1, flash_g4c3))]
|
||||||
w.set_bker(sector.bank == crate::flash::FlashBank::Bank2);
|
w.set_bker(sector.bank == crate::flash::FlashBank::Bank2);
|
||||||
#[cfg(flash_g0x0)]
|
#[cfg(flash_g0x0)]
|
||||||
w.set_pnb(idx as u16);
|
w.set_pnb(idx as u16);
|
||||||
|
|||||||
@ -107,8 +107,8 @@ pub enum FlashBank {
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
not(any(
|
not(any(
|
||||||
flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb, flash_f0, flash_f1, flash_f2, flash_f3, flash_f4,
|
flash_l0, flash_l1, flash_l4, flash_l5, flash_wl, flash_wb, flash_f0, flash_f1, flash_f2, flash_f3, flash_f4,
|
||||||
flash_f7, flash_g0x0, flash_g0x1, flash_g4c2, flash_g4c3, flash_g4c4, flash_h7, flash_h7ab, flash_u5, flash_h50, flash_u0,
|
flash_f7, flash_g0x0, flash_g0x1, flash_g4c2, flash_g4c3, flash_g4c4, flash_h7, flash_h7ab, flash_u5,
|
||||||
flash_h5,
|
flash_h50, flash_u0, flash_h5,
|
||||||
)),
|
)),
|
||||||
path = "other.rs"
|
path = "other.rs"
|
||||||
)]
|
)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user