/* Clear the DMA interrupt flag of a channel.  */
void DMAChannelIntFlagClear(unsigned long ulChannelID, unsigned long ulIntFlags)
/* Clear the DMA interrupt flag of a channel.  */
void DMAChannelIntFlagClear(unsigned long ulChannelID, unsigned long ulIntFlags)
{
    xASSERT(xDMAChannelIDValid(ulChannelID));
    xASSERT((ulIntFlags == DMA_EVENT_TC)    ||
            (ulIntFlags == DMA_EVENT_ERROR) ||
            (ulIntFlags == DMA_EVENT_TEMPTY));
    if(ulIntFlags == DMA_EVENT_TC)
    {
    	xHWREG(DMA0_BASE + DMA_TDF) |= (1 << ulChannelID);
    }
    if(ulIntFlags == DMA_EVENT_ERROR)
    {
    	xHWREG(DMA0_BASE + DMA_ABTF) |= (1 << ulChannelID);
    }
    if(ulIntFlags == DMA_EVENT_TEMPTY)
    {
        xHWREG(DMA0_BASE + DMA_SCATDF) |= (1 << ulChannelID);
    }
}