stm32f3: flash: add clear write protect flag

Could actually move to flash_common_f, but they have different names for
the same bit at present.
This commit is contained in:
Karl Palsson 2018-07-25 23:27:08 +00:00
parent d465291f45
commit 3293913be2
2 changed files with 7 additions and 0 deletions

View File

@ -98,6 +98,7 @@
BEGIN_DECLS
void flash_clear_pgerr_flag(void);
void flash_clear_wrprterr_flag(void);
END_DECLS

View File

@ -51,6 +51,11 @@ void flash_clear_pgerr_flag(void)
FLASH_SR |= FLASH_SR_PGERR;
}
void flash_clear_wrprterr_flag(void)
{
FLASH_SR |= FLASH_SR_WRPRTERR;
}
/*---------------------------------------------------------------------------*/
/** @brief Clear All Status Flags
@ -60,6 +65,7 @@ Clears program error, end of operation, busy flags.
void flash_clear_status_flags(void)
{
flash_clear_pgerr_flag();
flash_clear_wrprterr_flag();
flash_clear_eop_flag();
}