/* Read the specified SMC interrupt has occurred or not.  */
uint16_t SMC_ReadIntFlag(SMC_BANK_NAND_T bank, SMC_INT_T flag)
/* Read the specified SMC interrupt has occurred or not.  */
uint16_t SMC_ReadIntFlag(SMC_BANK_NAND_T bank, SMC_INT_T flag)
{
    uint32_t tmpStatus = 0x0, itstatus = 0x0, itenable = 0x0;
    if (bank == SMC_BANK2_NAND)
    {
        tmpStatus = SMC_Bank2->STSINT2;
    }
    else if (bank == SMC_BANK3_NAND)
    {
        tmpStatus = SMC_Bank3->STSINT3;
    }
    else
    {
        tmpStatus = SMC_Bank4->STSINT4;
    }
    itstatus = tmpStatus & flag;
    itenable = tmpStatus & (flag >> 3);
    if ((itstatus != RESET) && (itenable != RESET))
    {
        return SET;
    }
    else
    {
        return RESET;
    }
}