/* Indentifies a DMA channel causing interrupt. 
This functions returns a channel causing interrupt of type dmacHw_INTERRUPT_STATUS_e */
dmacHw_HANDLE_t dmacHw_getInterruptSource(void)
/* Indentifies a DMA channel causing interrupt. 
This functions returns a channel causing interrupt of type dmacHw_INTERRUPT_STATUS_e */
dmacHw_HANDLE_t dmacHw_getInterruptSource(void)
{
	uint32_t i;
	for (i = 0; i < dmaChannelCount_0 + dmaChannelCount_1; i++) {
		if ((dmacHw_REG_INT_STAT_TRAN(dmacHw_gCblk[i].module) &
		     ((0x00000001 << dmacHw_gCblk[i].channel)))
		    || (dmacHw_REG_INT_STAT_BLOCK(dmacHw_gCblk[i].module) &
			((0x00000001 << dmacHw_gCblk[i].channel)))
		    || (dmacHw_REG_INT_STAT_ERROR(dmacHw_gCblk[i].module) &
			((0x00000001 << dmacHw_gCblk[i].channel)))
		    ) {
			return dmacHw_CBLK_TO_HANDLE(&dmacHw_gCblk[i]);
		}
	}
	return dmacHw_CBLK_TO_HANDLE(NULL);
}