XilinxProcessorIPLib/drivers/mcdma/src/xmcdma_intr.c
void XMcdma_ChanIntrHandler(void *Instance)
{
	u32 IrqStatus;
	XMcdma_ChanCtrl *Chan = NULL;
	Chan = (XMcdma_ChanCtrl *)((void *)Instance);

        /* Get pending interrupts */
	IrqStatus = XMcdma_ChanGetIrq(Chan);

	/* Acknowledge pending interrupts */
	XMcdma_ChanAckIrq(Chan, IrqStatus);

	/*
	 * If no interrupt is asserted, we do not do anything
	 */
	if (!(IrqStatus & XMCDMA_IRQ_ALL_MASK)) {
		return;
	}

	if ((IrqStatus & (XMCDMA_IRQ_DELAY_MASK | XMCDMA_IRQ_IOC_MASK))) {
                Chan->ChanState = XMCDMA_CHAN_IDLE;
                Chan->DoneHandler(Chan->DoneRef);
	}

	if ((IrqStatus & XMCDMA_IRQ_ERROR_MASK)) {
		Chan->ChanState = XMCDMA_CHAN_PAUSE;
		Chan->ErrorHandler(Chan->ErrorRef, IrqStatus);
	}
}
/*****************************************************************************/
/**
*
* This function is the Per Channel interrupt handler for the MCDMA core.
*
* This handler reads the pending interrupt from Status register, determines the
* source of the interrupts and calls the respective callbacks for the
* interrupts that are enabled in the per channel control register,
* and finally clears the interrupts.
*
* The application is responsible for connecting this function to the interrupt
* system. Application beyond this driver is also responsible for providing
* callbacks to handle interrupts and installing the callbacks using
* XMcdma_ChanSetCallBack() during initialization phase.
*
* @param	Instance is a pointer to the Channel instance to be worked on.
*
* @return	None.
*
* @note		To generate interrupt required interrupts should be enabled.
*
******************************************************************************/
This function is the Per Channel interrupt handler for the MCDMA core.
This handler reads the pending interrupt from Status register, determines the
source of the interrupts and calls the respective callbacks for the
interrupts that are enabled in the per channel control register,
and finally clears the interrupts.

The application is responsible for connecting this function to the interrupt
system. Application beyond this driver is also responsible for providing
callbacks to handle interrupts and installing the callbacks using
XMcdma_ChanSetCallBack() during initialization phase.
This function is the Per Channel interrupt handler for the MCDMA core . This handler reads the pending interrupt from Status register determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in the per channel control register and finally clears the interrupts . The application is responsible for connecting this function to the interrupt system . Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XMcdma_ChanSetCallBack () during initialization phase .
void XMcdma_ChanIntrHandler(void *Instance)
{
	u32 IrqStatus;
	XMcdma_ChanCtrl *Chan = NULL;
	Chan = (XMcdma_ChanCtrl *)((void *)Instance);
	IrqStatus = XMcdma_ChanGetIrq(Chan);
	XMcdma_ChanAckIrq(Chan, IrqStatus);
	if (!(IrqStatus & XMCDMA_IRQ_ALL_MASK)) {
		return;
	}
	if ((IrqStatus & (XMCDMA_IRQ_DELAY_MASK | XMCDMA_IRQ_IOC_MASK))) {
                Chan->ChanState = XMCDMA_CHAN_IDLE;
                Chan->DoneHandler(Chan->DoneRef);
	}
	if ((IrqStatus & XMCDMA_IRQ_ERROR_MASK)) {
		Chan->ChanState = XMCDMA_CHAN_PAUSE;
		Chan->ErrorHandler(Chan->ErrorRef, IrqStatus);
	}
}
void XMcdma_ChanIntrHandler ( void * Instance ) { u32 IrqStatus ; XMcdma_ChanCtrl * Chan = NULL ; Chan = ( XMcdma_ChanCtrl * ) ( ( void * ) Instance ) ; IrqStatus = XMcdma_ChanGetIrq ( Chan ) ; XMcdma_ChanAckIrq ( Chan , IrqStatus ) ; if ( ! ( IrqStatus & XMCDMA_IRQ_ALL_MASK ) ) { return ; } if ( ( IrqStatus & ( XMCDMA_IRQ_DELAY_MASK | XMCDMA_IRQ_IOC_MASK ) ) ) { Chan -> ChanState = XMCDMA_CHAN_IDLE ; Chan -> DoneHandler ( Chan -> DoneRef ) ; } if ( ( IrqStatus & XMCDMA_IRQ_ERROR_MASK ) ) { Chan -> ChanState = XMCDMA_CHAN_PAUSE ; Chan -> ErrorHandler ( Chan -> ErrorRef , IrqStatus ) ; } }
This function is the Per Channel interrupt handler for the MCDMA core.
This function is the Per Channel interrupt handler for the MCDMA core .
/* Get pending interrupts */ /* Acknowledge pending interrupts */ /*
	 * If no interrupt is asserted, we do not do anything
	 */