/* Checks whether the specified DMA Channeln flag is set or not.  */
FlagStatus DMA_GetFlagStatus(DMA_Flags_TypeDef flag)
/* Checks whether the specified DMA Channeln flag is set or not.  */
FlagStatus DMA_GetFlagStatus(DMA_Flags_TypeDef flag)
{
    if(flag >= DMA2_FLAG_GL1 ) {
        return (DMA2->ISR & flag) ? SET : RESET;
    }
    return (DMA1->ISR & flag) ? SET : RESET;
}