STM32: Enable flash support for STM32G4
This commit is contained in:
parent
ccf602b333
commit
f6bc96dfbd
8 changed files with 10 additions and 10 deletions
|
@ -79,7 +79,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -337,7 +337,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||
|
||||
pub(crate) fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,6 @@ pub(crate) unsafe fn wait_ready_blocking() -> Result<(), Error> {
|
|||
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
|
@ -113,7 +113,7 @@ pub(crate) unsafe fn clear_all_err() {
|
|||
|
||||
unsafe fn bank_clear_all_err(bank: pac::flash::Bank) {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
bank.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
|||
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
// This clears all "write 1 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -63,13 +63,13 @@ impl FlashRegion {
|
|||
#[cfg_attr(flash_f3, path = "f3.rs")]
|
||||
#[cfg_attr(flash_f4, path = "f4.rs")]
|
||||
#[cfg_attr(flash_f7, path = "f7.rs")]
|
||||
#[cfg_attr(flash_g0, path = "g0.rs")]
|
||||
#[cfg_attr(any(flash_g0, flash_g4), path = "g.rs")]
|
||||
#[cfg_attr(flash_h7, path = "h7.rs")]
|
||||
#[cfg_attr(flash_h7ab, path = "h7.rs")]
|
||||
#[cfg_attr(
|
||||
not(any(
|
||||
flash_l0, flash_l1, flash_l4, flash_wl, flash_wb, flash_f0, flash_f3, flash_f4, flash_f7, flash_g0, flash_h7,
|
||||
flash_h7ab
|
||||
flash_l0, flash_l1, flash_l4, flash_wl, flash_wb, flash_f0, flash_f3, flash_f4, flash_f7, flash_g0, flash_g4,
|
||||
flash_h7, flash_h7ab
|
||||
)),
|
||||
path = "other.rs"
|
||||
)]
|
||||
|
|
Loading…
Reference in a new issue