/* Clear the FIFO buffer of the specified SPI port.  */
void SPIFIFOClear(unsigned long ulBase, unsigned long ulRxTx)
/* Clear the FIFO buffer of the specified SPI port.  */
void SPIFIFOClear(unsigned long ulBase, unsigned long ulRxTx)
{
    xASSERT(ulBase == SPI0_BASE);
    xASSERT((ulRxTx == SPI_FSR_RX) || (ulRxTx == SPI_FSR_TX));
    if(ulRxTx == SPI_FSR_RX)
    {
        xHWREG(ulBase + SPI_FCR) |= SPI_FCR_RFPR;
    }
    else
    {
        xHWREG(ulBase + SPI_FCR) |= SPI_FCR_TFPR;
    }
}