/* Program the Option Bytes. 
Only the lower 8 bits of the data is significant. */
void flash_program_option_bytes(uint32_t address, uint16_t data)
/* Program the Option Bytes. 
Only the lower 8 bits of the data is significant. */
void flash_program_option_bytes(uint32_t address, uint16_t data)
{
	flash_wait_for_last_operation();
	if ((FLASH_CR & FLASH_CR_OPTWRE) == 0) {
		flash_unlock_option_bytes();
	}
	FLASH_CR |= FLASH_CR_OPTPG;
	MMIO16(address) = data;
	flash_wait_for_last_operation();
	FLASH_CR &= ~FLASH_CR_OPTPG;
}