/* SPI1 interrupt handler. Clear the SPI interrupt flag and execute the callback function.  */
void SPI1IntHandler(void)
/* SPI1 interrupt handler. Clear the SPI interrupt flag and execute the callback function.  */
void SPI1IntHandler(void)
{
    unsigned long ulFIFOFlags, ulFlags;
    unsigned long ulBase = SPI1_BASE;
    ulFIFOFlags = xHWREG(ulBase + SPI_FSR);   
    ulFlags = xHWREG(ulBase + SPI_SR);
    xHWREG(ulBase + SPI_FSR) &= ~ulFIFOFlags;
    xHWREG(ulBase + SPI_SR)	|= 0x78;
    if(g_pfnSPIHandlerCallbacks[1])
    {
        g_pfnSPIHandlerCallbacks[0](0, 0, (ulFIFOFlags << 16) | ulFlags, 0);
    }
}