/* Returns the current status register of the given DMA peripheral, but masking interrupt sources which are not currently enabled.  */
unsigned int DMA_GetMaskedStatus(void)
/* Returns the current status register of the given DMA peripheral, but masking interrupt sources which are not currently enabled.  */
unsigned int DMA_GetMaskedStatus(void)
{
    unsigned int status;
    status = AT91C_BASE_HDMA->HDMA_EBCISR;
    status &= AT91C_BASE_HDMA->HDMA_EBCIMR;
    return status;
}