/* Programs a half word at a specified Option Byte Data address.  */
FLASH_Status FLASH_OB_ProgramData(uint32_t Address, uint8_t Data)
/* Programs a half word at a specified Option Byte Data address.  */
FLASH_Status FLASH_OB_ProgramData(uint32_t Address, uint8_t Data)
{
    FLASH_Status status = FLASH_COMPLETE;
    assert_param(IS_OB_DATA_ADDRESS(Address));
    status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT);
    if (status == FLASH_COMPLETE)
    {
        FLASH->CR |= FLASH_CR_OPTPG;
        *(__IO uint16_t *)Address = Data;
        status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT);
        if (status != FLASH_TIMEOUT)
        {
            FLASH->CR &= ~FLASH_CR_OPTPG;
        }
    }
    return status;
}