stm32/flash: avoid pointless "if flag is set, set it".
This commit is contained in:
@ -336,12 +336,9 @@ pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), E
|
||||
}
|
||||
|
||||
pub(crate) fn clear_all_err() {
|
||||
pac::FLASH.sr().write(|w| {
|
||||
w.set_pgserr(true);
|
||||
w.set_pgperr(true);
|
||||
w.set_pgaerr(true);
|
||||
w.set_wrperr(true);
|
||||
});
|
||||
// read and write back the same value.
|
||||
// This clears all "write 0 to clear" bits.
|
||||
pac::FLASH.sr().modify(|_| {});
|
||||
}
|
||||
|
||||
pub(crate) async fn wait_ready() -> Result<(), Error> {
|
||||
|
Reference in New Issue
Block a user