/* Checks whether the FLASH SMPSEL is SMP1 or SMP2.  */
FLASH_SMPSEL FLASH_GetSMPSELStatus(void)
/* Checks whether the FLASH SMPSEL is SMP1 or SMP2.  */
FLASH_SMPSEL FLASH_GetSMPSELStatus(void)
{
    FLASH_SMPSEL bitstatus = FLASH_SMP1;
    if ((FLASH->CTRL & CTRL_SMPSEL_SMP2) != (uint32_t)FLASH_SMP1)
    {
        bitstatus = FLASH_SMP2;
    }
    else
    {
        bitstatus = FLASH_SMP1;
    }
    return bitstatus;
}