XilinxProcessorIPLib/drivers/tpg/src/xtpg_intr.c
void XTpg_IntrHandler(void *InstancePtr)
{
	u32 PendingIntr;
	u32 ErrorStatus;
	XTpg *XTpgPtr = NULL;
	XTpgPtr = (XTpg *) ((void *)InstancePtr);

	/* Verify Arguments. */
	Xil_AssertVoid(XTpgPtr != NULL);
	Xil_AssertVoid(XTpgPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
	Xil_AssertVoid(XTpgPtr->Config.HasIntcIf != (u16)0x0);

	/* Get pending interrupts */
	PendingIntr = (u32)XTpg_IntrGetPending(XTpgPtr);

	/* A Slave error interrupt has been happened */
	if (((PendingIntr) & (XTPG_IXR_SE_MASK)) ==
			(XTPG_IXR_SE_MASK)) {
		ErrorStatus = (PendingIntr) & ((u32)(XTPG_IXR_SE_MASK));
		XTpgPtr->ErrCallBack(XTpgPtr->ErrRef, ErrorStatus);
	}

	/* A Processing Start interrupt has occurred */
	if (((PendingIntr) & (XTPG_IXR_PROCS_STARTED_MASK)) ==
					(XTPG_IXR_PROCS_STARTED_MASK)) {
		XTpgPtr->ProcStartCallBack(XTpgPtr->ProcStartRef);
	}

	/* A Frame Done interrupt has occurred */
	if (((PendingIntr) & (XTPG_IXR_EOF_MASK)) == (XTPG_IXR_EOF_MASK)) {
		XTpgPtr->FrameDoneCallBack(XTpgPtr->FrameDoneRef);
	}

	/* Clear pending interrupts */
	XTpg_IntrClear(XTpgPtr, PendingIntr);

}
/*****************************************************************************/
/**
*
* This function is the interrupt handler for the TPG driver.
*
* This handler reads the pending interrupt from the STATUS register,
* determines the source of the interrupts and calls the respective
* callbacks for the interrupts that are enabled in IRQ_ENABLE 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
* XTpg_SetCallBack() during initialization phase.
*
* @param	InstancePtr is a pointer to the XTpg instance that
*		just interrupted.
*
* @return	None.
*
* @note		Interrupt interface should be enabled.
*
******************************************************************************/
This function is the interrupt handler for the TPG driver.
This handler reads the pending interrupt from the STATUS register,
determines the source of the interrupts and calls the respective
callbacks for the interrupts that are enabled in IRQ_ENABLE 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
XTpg_SetCallBack() during initialization phase.
This function is the interrupt handler for the TPG driver . This handler reads the pending interrupt from the STATUS register determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE 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 XTpg_SetCallBack () during initialization phase .
void XTpg_IntrHandler(void *InstancePtr)
{
	u32 PendingIntr;
	u32 ErrorStatus;
	XTpg *XTpgPtr = NULL;
	XTpgPtr = (XTpg *) ((void *)InstancePtr);
	Xil_AssertVoid(XTpgPtr != NULL);
	Xil_AssertVoid(XTpgPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY));
	Xil_AssertVoid(XTpgPtr->Config.HasIntcIf != (u16)0x0);
	PendingIntr = (u32)XTpg_IntrGetPending(XTpgPtr);
	if (((PendingIntr) & (XTPG_IXR_SE_MASK)) ==
			(XTPG_IXR_SE_MASK)) {
		ErrorStatus = (PendingIntr) & ((u32)(XTPG_IXR_SE_MASK));
		XTpgPtr->ErrCallBack(XTpgPtr->ErrRef, ErrorStatus);
	}
	if (((PendingIntr) & (XTPG_IXR_PROCS_STARTED_MASK)) ==
					(XTPG_IXR_PROCS_STARTED_MASK)) {
		XTpgPtr->ProcStartCallBack(XTpgPtr->ProcStartRef);
	}
	if (((PendingIntr) & (XTPG_IXR_EOF_MASK)) == (XTPG_IXR_EOF_MASK)) {
		XTpgPtr->FrameDoneCallBack(XTpgPtr->FrameDoneRef);
	}
	XTpg_IntrClear(XTpgPtr, PendingIntr);
}
void XTpg_IntrHandler ( void * InstancePtr ) { u32 PendingIntr ; u32 ErrorStatus ; XTpg * XTpgPtr = NULL ; XTpgPtr = ( XTpg * ) ( ( void * ) InstancePtr ) ; Xil_AssertVoid ( XTpgPtr != NULL ) ; Xil_AssertVoid ( XTpgPtr -> IsReady == ( u32 ) ( XIL_COMPONENT_IS_READY ) ) ; Xil_AssertVoid ( XTpgPtr -> Config . HasIntcIf != ( u16 ) 0x0 ) ; PendingIntr = ( u32 ) XTpg_IntrGetPending ( XTpgPtr ) ; if ( ( ( PendingIntr ) & ( XTPG_IXR_SE_MASK ) ) == ( XTPG_IXR_SE_MASK ) ) { ErrorStatus = ( PendingIntr ) & ( ( u32 ) ( XTPG_IXR_SE_MASK ) ) ; XTpgPtr -> ErrCallBack ( XTpgPtr -> ErrRef , ErrorStatus ) ; } if ( ( ( PendingIntr ) & ( XTPG_IXR_PROCS_STARTED_MASK ) ) == ( XTPG_IXR_PROCS_STARTED_MASK ) ) { XTpgPtr -> ProcStartCallBack ( XTpgPtr -> ProcStartRef ) ; } if ( ( ( PendingIntr ) & ( XTPG_IXR_EOF_MASK ) ) == ( XTPG_IXR_EOF_MASK ) ) { XTpgPtr -> FrameDoneCallBack ( XTpgPtr -> FrameDoneRef ) ; } XTpg_IntrClear ( XTpgPtr , PendingIntr ) ; }
This function is the interrupt handler for the TPG driver.
This function is the interrupt handler for the TPG driver .
/* Verify Arguments. */ /* Get pending interrupts */ /* A Slave error interrupt has been happened */ /* A Processing Start interrupt has occurred */ /* A Frame Done interrupt has occurred */ /* Clear pending interrupts */