Skip to content
Commit d8ad569d authored by Thomas Stranger's avatar Thomas Stranger Committed by Christopher Friedt
Browse files

drivers: flash: stm32g0: preparation for dual bank handling



This commit makes no functional changes, it only refactors the
driver such that dual bank flash handling can be easily added.

Instead of using HAL macros directly in the code, new macros
with STM32G0 prefix are defined.
The erase_page function gets passed the offset instead of the page,
and the FLASH CR reg is written once with all erase parameters.
flash_stm32_wait_flash_idle is already called before each
write to CR, consequently it is also made sure CFGBSY flag
is not set.

Signed-off-by: default avatarThomas Stranger <thomas.stranger@outlook.com>
parent a04de789
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment