/* Get the SPI interrupt flag of the specified SPI port.  */
unsigned long SPIIntFlagGet(unsigned long ulBase, xtBoolean xbMasked)
/* Get the SPI interrupt flag of the specified SPI port.  */
unsigned long SPIIntFlagGet(unsigned long ulBase, xtBoolean xbMasked)
{
    unsigned long ulFlag, ulFlag1;
    xASSERT(ulBase == SPI0_BASE);
    xASSERT(xbMasked == xfalse);
    ulFlag = xHWREG(ulBase + SPI_CNTRL) & SPI_CNTRL_IF;
    ulFlag1 = xHWREG(ulBase + SPI_CNTRL2) & SPI_CNTRL2_SLV_START_INTSTS;
    if(ulFlag != 0)
    {
        return SPI_CNTRL_IF;
    }
    else if(ulFlag1 != 0)
    {
        return  SPI_CNTRL2_SLV_START_INTSTS;   
    }
    else
    {
        return 0;  
    }
}