*_blocking -> blocking_*
This commit is contained in:
@ -38,7 +38,7 @@ pub(crate) unsafe fn disable_blocking_write() {
|
||||
pac::FLASH.cr().write(|w| w.set_pg(false));
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn write_blocking(start_address: u32, buf: &[u8; WRITE_SIZE]) -> Result<(), Error> {
|
||||
pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE]) -> Result<(), Error> {
|
||||
let mut address = start_address;
|
||||
for val in buf.chunks(4) {
|
||||
write_volatile(address as *mut u32, u32::from_le_bytes(val.try_into().unwrap()));
|
||||
@ -48,10 +48,10 @@ pub(crate) unsafe fn write_blocking(start_address: u32, buf: &[u8; WRITE_SIZE])
|
||||
fence(Ordering::SeqCst);
|
||||
}
|
||||
|
||||
wait_ready_blocking()
|
||||
blocking_wait_ready()
|
||||
}
|
||||
|
||||
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_ser(true);
|
||||
w.set_snb(sector.index_in_bank)
|
||||
@ -61,7 +61,7 @@ pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), E
|
||||
w.set_strt(true);
|
||||
});
|
||||
|
||||
let ret: Result<(), Error> = wait_ready_blocking();
|
||||
let ret: Result<(), Error> = blocking_wait_ready();
|
||||
pac::FLASH.cr().modify(|w| w.set_ser(false));
|
||||
clear_all_err();
|
||||
ret
|
||||
@ -87,7 +87,7 @@ pub(crate) unsafe fn clear_all_err() {
|
||||
});
|
||||
}
|
||||
|
||||
unsafe fn wait_ready_blocking() -> Result<(), Error> {
|
||||
unsafe fn blocking_wait_ready() -> Result<(), Error> {
|
||||
loop {
|
||||
let sr = pac::FLASH.sr().read();
|
||||
|
||||
|
Reference in New Issue
Block a user