/* Read whether the specifie DMA Channel flag is set or not.  */
uint8_t DMA_ReadStatusFlag(DMA_FLAG_T flag)
/* Read whether the specifie DMA Channel flag is set or not.  */
uint8_t DMA_ReadStatusFlag(DMA_FLAG_T flag)
{
    if ((flag & 0x10000000) != RESET)
    {
        if ((DMA2->INTSTS & flag) != RESET)
        {
            return SET ;
        }
        else
        {
            return RESET ;
        }
    }
    else
    {
        if ((DMA1->INTSTS & flag) != RESET)
        {
            return SET ;
        }
        else
        {
            return RESET ;
        }
    }
}