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:
parent
d465291f45
commit
3293913be2
@ -98,6 +98,7 @@
|
||||
BEGIN_DECLS
|
||||
|
||||
void flash_clear_pgerr_flag(void);
|
||||
void flash_clear_wrprterr_flag(void);
|
||||
|
||||
END_DECLS
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user