stm32: flash_unlock_option_bytes is common code.
The keys differ between some familes, but the documentation and implementation are standard.
This commit is contained in:
@@ -82,19 +82,6 @@ void flash_wait_for_last_operation(void)
|
||||
while ((FLASH_SR & FLASH_SR_BSY) == FLASH_SR_BSY);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @brief Unlock the Option Byte Access
|
||||
|
||||
This enables write access to the option bytes. It is locked by default on
|
||||
reset.
|
||||
*/
|
||||
|
||||
void flash_unlock_option_bytes(void)
|
||||
{
|
||||
FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1;
|
||||
FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @brief Lock the Option Byte Access
|
||||
|
||||
|
||||
Reference in New Issue
Block a user