/* Clear whether the specified DMA flag is set or not.  */
void DMA_ClearStatusFlag(uint32_t flag)
/* Clear whether the specified DMA flag is set or not.  */
void DMA_ClearStatusFlag(uint32_t flag)
{
    if ((flag & 0x10000000) == SET)
    {
        DMA2->INTFCLR |= (uint32_t)(flag & 0x000FFFFF);
    }
    else
    {
        DMA1->INTFCLR |= (uint32_t)(flag & 0x0FFFFFFF);
    }
}