erase_sector_blocking -> blocking_erase_sector
This commit is contained in:
parent
4478d8322b
commit
74104aafda
@ -49,7 +49,7 @@ pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE])
|
||||
wait_ready_blocking()
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), Error> {
|
||||
pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> {
|
||||
pac::FLASH.cr().modify(|w| {
|
||||
w.set_per(true);
|
||||
});
|
||||
|
@ -49,7 +49,7 @@ pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE])
|
||||
wait_ready_blocking()
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), Error> {
|
||||
pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> {
|
||||
pac::FLASH.cr().modify(|w| {
|
||||
w.set_per(true);
|
||||
});
|
||||
|
@ -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())
|
||||
|
@ -70,7 +70,7 @@ pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE])
|
||||
wait_ready_blocking()
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), Error> {
|
||||
pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> {
|
||||
#[cfg(any(flash_l0, flash_l1))]
|
||||
{
|
||||
pac::FLASH.pecr().modify(|w| {
|
||||
|
@ -27,7 +27,7 @@ pub(crate) unsafe fn disable_blocking_write() {
|
||||
pub(crate) unsafe fn blocking_write(_start_address: u32, _buf: &[u8; WRITE_SIZE]) -> Result<(), Error> {
|
||||
unimplemented!();
|
||||
}
|
||||
pub(crate) unsafe fn erase_sector_blocking(_sector: &FlashSector) -> Result<(), Error> {
|
||||
pub(crate) unsafe fn blocking_erase_sector(_sector: &FlashSector) -> Result<(), Error> {
|
||||
unimplemented!();
|
||||
}
|
||||
pub(crate) unsafe fn clear_all_err() {
|
||||
|
Loading…
Reference in New Issue
Block a user