/* DMA Stream Read Interrupt Flag. 
The interrupt flag for the stream is returned. */
bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t interrupt)
/* DMA Stream Read Interrupt Flag. 
The interrupt flag for the stream is returned. */
bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t interrupt)
{
	uint32_t flag = (interrupt << DMA_ISR_OFFSET(stream));
	if (stream < 4) {
		return ((DMA_LISR(dma) & flag) > 0);
	} else {
		return ((DMA_HISR(dma) & flag) > 0);
	}
}