/* Checks whether the specified FLASH flag is set or not.  */
FlagStatus FLASH_GetFlagStatus(u16 flag)
/* Checks whether the specified FLASH flag is set or not.  */
FlagStatus FLASH_GetFlagStatus(u16 flag)
{
    return ((flag == FLASH_FLAG_OPTERR) ? (FLASH->OBR & FLASH_FLAG_OPTERR) : (FLASH->SR & flag)) ? SET : RESET;
}