XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_example.c
static int AvbSetupInterruptSystem(XAvb *InstancePtr)
{
	int Status;

	/*
	 * Initialize the interrupt controller driver so that it can be used.
	 * XPAR_INTC_0_DEVICE_ID specifies the XINTC device ID that is
	 * generated in xparameters.h
	 */
	Status = XIntc_Initialize(&InterruptController, XPAR_INTC_0_DEVICE_ID);

	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


	/*
	 * Connect the Ethernet AVB Endpoint's 10 ms interrupt
	 */
	Status = XIntc_Connect(&InterruptController,
			AVB_PTP_INTERRUPT_ID,
			(XInterruptHandler)XAvb_PtpTimerInterruptHandler,
			InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Connect the Ethernet AVB Endpoint's PTP Rx interrupt
	 */
	Status = XIntc_Connect(&InterruptController,
			AVB_PTP_RX_INTERRUPT_ID,
			(XInterruptHandler)XAvb_PtpRxInterruptHandler,
			InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Start the interrupt controller so interrupts are enabled for all
	 * devices that cause interrupts.
	 */
	Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Enable interrupt on Microblaze
	 */
	Xil_ExceptionInit();
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XIntc_InterruptHandler,
				(void *)&InterruptController);
	Xil_ExceptionEnable();

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function sets up the interrupt system so interrupts can occur for the
* AVB design.
*
* @param	InstancePtr contains a pointer to the instance of the AVB
*		component which is going to be connected to the interrupt
*		controller.
*
* @return	- XST_SUCCESS if successful.
*		- XST_FAILURE, in case of failure..
*
* @note		None.
*
****************************************************************************/
This function sets up the interrupt system so interrupts can occur for the
AVB design.
This function sets up the interrupt system so interrupts can occur for the AVB design .
static int AvbSetupInterruptSystem(XAvb *InstancePtr)
{
	int Status;
	Status = XIntc_Initialize(&InterruptController, XPAR_INTC_0_DEVICE_ID);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XIntc_Connect(&InterruptController,
			AVB_PTP_INTERRUPT_ID,
			(XInterruptHandler)XAvb_PtpTimerInterruptHandler,
			InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XIntc_Connect(&InterruptController,
			AVB_PTP_RX_INTERRUPT_ID,
			(XInterruptHandler)XAvb_PtpRxInterruptHandler,
			InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Xil_ExceptionInit();
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XIntc_InterruptHandler,
				(void *)&InterruptController);
	Xil_ExceptionEnable();
	return XST_SUCCESS;
}
static int AvbSetupInterruptSystem ( XAvb * InstancePtr ) { int Status ; Status = XIntc_Initialize ( & InterruptController , XPAR_INTC_0_DEVICE_ID ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XIntc_Connect ( & InterruptController , AVB_PTP_INTERRUPT_ID , ( XInterruptHandler ) XAvb_PtpTimerInterruptHandler , InstancePtr ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XIntc_Connect ( & InterruptController , AVB_PTP_RX_INTERRUPT_ID , ( XInterruptHandler ) XAvb_PtpRxInterruptHandler , InstancePtr ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XIntc_Start ( & InterruptController , XIN_REAL_MODE ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Xil_ExceptionInit ( ) ; Xil_ExceptionRegisterHandler ( XIL_EXCEPTION_ID_INT , ( Xil_ExceptionHandler ) XIntc_InterruptHandler , ( void * ) & InterruptController ) ; Xil_ExceptionEnable ( ) ; return XST_SUCCESS ; }
This function sets up the interrupt system so interrupts can occur for the
AVB design.
This function sets up the interrupt system so interrupts can occur for the AVB design .
/*
	 * Initialize the interrupt controller driver so that it can be used.
	 * XPAR_INTC_0_DEVICE_ID specifies the XINTC device ID that is
	 * generated in xparameters.h
	 */ /*
	 * Connect the Ethernet AVB Endpoint's 10 ms interrupt
	 */ /*
	 * Connect the Ethernet AVB Endpoint's PTP Rx interrupt
	 */ /*
	 * Start the interrupt controller so interrupts are enabled for all
	 * devices that cause interrupts.
	 */ /*
	 * Enable interrupt on Microblaze
	 */