XilinxProcessorIPLib/drivers/ospipsv/examples/xospipsv_flash_intr_example.c
static int OspiPsvSetupIntrSystem(XScuGic *IntcInstancePtr,
			       XOspiPsv *OspiPsvInstancePtr)
{
	int Status;

	XScuGic_Config *IntcConfig; /* Instance of the interrupt controller */

	Xil_ExceptionInit();

	/*
	 * Initialize the interrupt controller driver so that it is ready to
	 * use.
	 */
	IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
	if (IntcConfig == NULL) {
		return XST_FAILURE;
	}

	Status = XScuGic_CfgInitialize(IntcInstancePtr, IntcConfig,
			IntcConfig->CpuBaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Connect the interrupt controller interrupt handler to the hardware
	 * interrupt handling logic in the processor.
	 */
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
			(Xil_ExceptionHandler)XScuGic_InterruptHandler,
			IntcInstancePtr);

	/*
	 * Connect the device driver handler that will be called when an
	 * interrupt for the device occurs, the handler defined above performs
	 * the specific interrupt processing for the device.
	 */
	Status = XScuGic_Connect(IntcInstancePtr, OSPIPSV_INTR_ID,
			(Xil_ExceptionHandler)XOspiPsv_IntrHandler,
			(void *)OspiPsvInstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}

	/*
	 * Enable the interrupt for the OspiPsv device.
	 */
	XScuGic_Enable(IntcInstancePtr, OSPIPSV_INTR_ID);

	/*
	 * Enable interrupts in the Processor.
	 */
	Xil_ExceptionEnable();

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 *
 * This function setups the interrupt system for a OspiPsv device.
 *
 * @param	IntcInstancePtr is a pointer to the instance of the Intc
 *		device.
 * @param	OspiPsvInstancePtr is a pointer to the instance of the
 *		OspiPsv device.
 *
 * @return	XST_SUCCESS if successful, otherwise XST_FAILURE.
 *
 * @note	None.
 *
 ******************************************************************************/
This function setups the interrupt system for a OspiPsv device.
@param       IntcInstancePtr is a pointer to the instance of the Intc
device.
@param       OspiPsvInstancePtr is a pointer to the instance of the
OspiPsv device.



@note        None.
This function setups the interrupt system for a OspiPsv device . @param IntcInstancePtr is a pointer to the instance of the Intc device . @param OspiPsvInstancePtr is a pointer to the instance of the OspiPsv device . @note None .
static int OspiPsvSetupIntrSystem(XScuGic *IntcInstancePtr,
			       XOspiPsv *OspiPsvInstancePtr)
{
	int Status;
	XScuGic_Config *IntcConfig; 
	Xil_ExceptionInit();
	IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
	if (IntcConfig == NULL) {
		return XST_FAILURE;
	}
	Status = XScuGic_CfgInitialize(IntcInstancePtr, IntcConfig,
			IntcConfig->CpuBaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
			(Xil_ExceptionHandler)XScuGic_InterruptHandler,
			IntcInstancePtr);
	Status = XScuGic_Connect(IntcInstancePtr, OSPIPSV_INTR_ID,
			(Xil_ExceptionHandler)XOspiPsv_IntrHandler,
			(void *)OspiPsvInstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}
	XScuGic_Enable(IntcInstancePtr, OSPIPSV_INTR_ID);
	Xil_ExceptionEnable();
	return XST_SUCCESS;
}
static int OspiPsvSetupIntrSystem ( XScuGic * IntcInstancePtr , XOspiPsv * OspiPsvInstancePtr ) { int Status ; XScuGic_Config * IntcConfig ; Xil_ExceptionInit ( ) ; IntcConfig = XScuGic_LookupConfig ( INTC_DEVICE_ID ) ; if ( IntcConfig == NULL ) { return XST_FAILURE ; } Status = XScuGic_CfgInitialize ( IntcInstancePtr , IntcConfig , IntcConfig -> CpuBaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Xil_ExceptionRegisterHandler ( XIL_EXCEPTION_ID_INT , ( Xil_ExceptionHandler ) XScuGic_InterruptHandler , IntcInstancePtr ) ; Status = XScuGic_Connect ( IntcInstancePtr , OSPIPSV_INTR_ID , ( Xil_ExceptionHandler ) XOspiPsv_IntrHandler , ( void * ) OspiPsvInstancePtr ) ; if ( Status != XST_SUCCESS ) { return Status ; } XScuGic_Enable ( IntcInstancePtr , OSPIPSV_INTR_ID ) ; Xil_ExceptionEnable ( ) ; return XST_SUCCESS ; }
This function setups the interrupt system for a OspiPsv device.
This function setups the interrupt system for a OspiPsv device .
/* Instance of the interrupt controller */ /*
	 * Initialize the interrupt controller driver so that it is ready to
	 * use.
	 */ /*
	 * Connect the interrupt controller interrupt handler to the hardware
	 * interrupt handling logic in the processor.
	 */ /*
	 * Connect the device driver handler that will be called when an
	 * interrupt for the device occurs, the handler defined above performs
	 * the specific interrupt processing for the device.
	 */ /*
	 * Enable the interrupt for the OspiPsv device.
	 */ /*
	 * Enable interrupts in the Processor.
	 */