erase_sector_blocking -> blocking_erase_sector

This commit is contained in:
Rasmus Melchior Jacobsen
2023-05-25 23:13:20 +02:00
parent 4478d8322b
commit 74104aafda
5 changed files with 8 additions and 4 deletions

View File

@ -320,6 +320,8 @@ unsafe fn write_start(start_address: u32, buf: &[u8; WRITE_SIZE]) {
pub(crate) async unsafe fn erase_sector(sector: &FlashSector) -> Result<(), Error> {
save_data_cache_state();
trace!("Erasing sector number {}", sector.snb());
pac::FLASH.cr().modify(|w| {
w.set_ser(true);
w.set_snb(sector.snb());
@ -344,6 +346,8 @@ pub(crate) async unsafe fn erase_sector(sector: &FlashSector) -> Result<(), Erro
pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> {
save_data_cache_state();
trace!("Blocking erasing sector number {}", sector.snb());
pac::FLASH.cr().modify(|w| {
w.set_ser(true);
w.set_snb(sector.snb())