stm32: flash: pull lock/unlock up to common_f.

This is a common operation, so definition in _all, and every part except
l0/l1 have the same implementation.  Bring in an _f file too.
This commit is contained in:
Karl Palsson
2018-07-13 20:58:21 +00:00
parent b23dccc7ae
commit da7ebafcbe
18 changed files with 59 additions and 114 deletions

View File

@@ -45,4 +45,15 @@ void flash_prefetch_disable(void);
void flash_set_ws(uint32_t ws);
/** Lock the Flash Program and Erase Controller
* Used to prevent spurious writes to FLASH.
*/
void flash_lock(void);
/** Unlock the Flash Program and Erase Controller
* This enables write access to the Flash memory. It is locked by default on
* reset.
*/
void flash_unlock(void);
END_DECLS

View File

@@ -99,8 +99,6 @@
BEGIN_DECLS
void flash_unlock(void);
void flash_lock(void);
void flash_clear_pgerr_flag(void);
void flash_clear_eop_flag(void);
void flash_clear_wrprterr_flag(void);

View File

@@ -74,8 +74,6 @@
BEGIN_DECLS
void flash_unlock(void);
void flash_lock(void);
void flash_clear_pgperr_flag(void);
void flash_clear_eop_flag(void);
void flash_clear_status_flags(void);

View File

@@ -118,8 +118,6 @@ void flash_unlock_progmem(void);
void flash_lock_progmem(void);
void flash_unlock_option_bytes(void);
void flash_lock_option_bytes(void);
void flash_unlock(void);
void flash_lock(void);
void eeprom_program_word(uint32_t address, uint32_t data);
void eeprom_program_words(uint32_t address, uint32_t *data, int length_in_words);

View File

@@ -152,8 +152,6 @@
BEGIN_DECLS
void flash_unlock(void);
void flash_lock(void);
void flash_clear_pgperr_flag(void);
void flash_clear_eop_flag(void);
void flash_wait_for_last_operation(void);

View File

@@ -224,8 +224,6 @@
BEGIN_DECLS
void flash_unlock(void);
void flash_lock(void);
void flash_clear_pgperr_flag(void);
void flash_clear_eop_flag(void);
void flash_wait_for_last_operation(void);