STM32: Enable flash support for STM32G4

This commit is contained in:
Adam Greig 2023-12-16 03:44:15 +00:00 committed by Dario Nieuwenhuis
parent 992a9565a8
commit 0f98fcdb19
8 changed files with 10 additions and 10 deletions

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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(|_| {});
}

View File

@ -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"
)]