/* 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_INT_TG) == DMA_INT_TG) ||
            ((ulIntFlags & DMA_INT_TC) == DMA_INT_TC) ||
            ((ulIntFlags & DMA_INT_HT) == DMA_INT_HT) ||
            ((ulIntFlags & DMA_INT_ERROR) == DMA_INT_ERROR));
    if((ulChannelID) < 7)
    {
        ulIntFlags = ulIntFlags << (ulChannelID * 4);
        xHWREG(DMA1_BASE + DMA_IFCR) |= ulIntFlags;
    }
    else
    {
        ulIntFlags = ulIntFlags << ((ulChannelID-1024) * 4);
        xHWREG(DMA1_BASE + DMA_IFCR) |= ulIntFlags;
    }
}