diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-25 21:46:26 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-25 21:46:26 +0200 |
| commit | 9eca19b49d462e57308e8b13f7ff03e10cfb0557 (patch) | |
| tree | 5c2f0e8f11d3044b718db1360922792594a99def /embassy-stm32/src/flash/f7.rs | |
| parent | 860b519f9993bd8991849c680aae058558aadfbd (diff) | |
*_blocking -> blocking_*
Diffstat (limited to 'embassy-stm32/src/flash/f7.rs')
| -rw-r--r-- | embassy-stm32/src/flash/f7.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32/src/flash/f7.rs b/embassy-stm32/src/flash/f7.rs index ab518bf89..f0c6bf81d 100644 --- a/embassy-stm32/src/flash/f7.rs +++ b/embassy-stm32/src/flash/f7.rs | |||
| @@ -38,7 +38,7 @@ pub(crate) unsafe fn disable_blocking_write() { | |||
| 38 | pac::FLASH.cr().write(|w| w.set_pg(false)); | 38 | pac::FLASH.cr().write(|w| w.set_pg(false)); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | pub(crate) unsafe fn write_blocking(start_address: u32, buf: &[u8; WRITE_SIZE]) -> Result<(), Error> { | 41 | pub(crate) unsafe fn blocking_write(start_address: u32, buf: &[u8; WRITE_SIZE]) -> Result<(), Error> { |
| 42 | let mut address = start_address; | 42 | let mut address = start_address; |
| 43 | for val in buf.chunks(4) { | 43 | for val in buf.chunks(4) { |
| 44 | write_volatile(address as *mut u32, u32::from_le_bytes(val.try_into().unwrap())); | 44 | 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]) | |||
| 48 | fence(Ordering::SeqCst); | 48 | fence(Ordering::SeqCst); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | wait_ready_blocking() | 51 | blocking_wait_ready() |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), Error> { | 54 | pub(crate) unsafe fn blocking_erase_sector(sector: &FlashSector) -> Result<(), Error> { |
| 55 | pac::FLASH.cr().modify(|w| { | 55 | pac::FLASH.cr().modify(|w| { |
| 56 | w.set_ser(true); | 56 | w.set_ser(true); |
| 57 | w.set_snb(sector.index_in_bank) | 57 | w.set_snb(sector.index_in_bank) |
| @@ -61,7 +61,7 @@ pub(crate) unsafe fn erase_sector_blocking(sector: &FlashSector) -> Result<(), E | |||
| 61 | w.set_strt(true); | 61 | w.set_strt(true); |
| 62 | }); | 62 | }); |
| 63 | 63 | ||
| 64 | let ret: Result<(), Error> = wait_ready_blocking(); | 64 | let ret: Result<(), Error> = blocking_wait_ready(); |
| 65 | pac::FLASH.cr().modify(|w| w.set_ser(false)); | 65 | pac::FLASH.cr().modify(|w| w.set_ser(false)); |
| 66 | clear_all_err(); | 66 | clear_all_err(); |
| 67 | ret | 67 | ret |
| @@ -87,7 +87,7 @@ pub(crate) unsafe fn clear_all_err() { | |||
| 87 | }); | 87 | }); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | unsafe fn wait_ready_blocking() -> Result<(), Error> { | 90 | unsafe fn blocking_wait_ready() -> Result<(), Error> { |
| 91 | loop { | 91 | loop { |
| 92 | let sr = pac::FLASH.sr().read(); | 92 | let sr = pac::FLASH.sr().read(); |
| 93 | 93 | ||
