XilinxProcessorIPLib/drivers/v_multi_scaler/examples/xv_multi_scaler_example.c
static int SetupInterruptSystem(void)
{
	int Status;
	XScuGic *IntcInstPtr = &Intc;

	/*
	* Initialize the interrupt controller driver so that it's ready to
	* use, specify the device ID that was generated in xparameters.h
	*/
	XScuGic_Config *IntcCfgPtr;
	IntcCfgPtr = XScuGic_LookupConfig(PS_ACPU_GIC_DEVICE_ID);
	if (!IntcCfgPtr) {
		xil_printf("ERR:: Interrupt Controller not found");
		return XST_DEVICE_NOT_FOUND;
	}
	Status = XScuGic_CfgInitialize(IntcInstPtr, IntcCfgPtr,
		IntcCfgPtr->CpuBaseAddress);

	if (Status != XST_SUCCESS) {
		xil_printf("Intc initialization failed!\r\n");
		return XST_FAILURE;
	}

	Xil_ExceptionInit();

	/*
	* Register the interrupt controller handler with the exception table.
	*/
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
		(Xil_ExceptionHandler) XScuGic_InterruptHandler,
		(XScuGic *)IntcInstPtr);

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 *
 * This function setups the interrupt system so interrupts can occur for the
 * multiscaler core.
 *
 * @return
 *	- XST_SUCCESS if interrupt setup was successful.
 *	- A specific error code defined in "xstatus.h" if an error
 *	occurs.
 *
 * @note	This function assumes a Microblaze or ARM system and no
 *	operating system is used.
 *
 ******************************************************************************/
This function setups the interrupt system so interrupts can occur for the
multiscaler core.

@return
- XST_SUCCESS if interrupt setup was successful.
- A specific error code defined in "xstatus.h" if an error
occurs.

@note        This function assumes a Microblaze or ARM system and no
operating system is used.
This function setups the interrupt system so interrupts can occur for the multiscaler core . @return - XST_SUCCESS if interrupt setup was successful . - A specific error code defined in " xstatus . h " if an error occurs . @note This function assumes a Microblaze or ARM system and no operating system is used .
static int SetupInterruptSystem(void)
{
	int Status;
	XScuGic *IntcInstPtr = &Intc;
	XScuGic_Config *IntcCfgPtr;
	IntcCfgPtr = XScuGic_LookupConfig(PS_ACPU_GIC_DEVICE_ID);
	if (!IntcCfgPtr) {
		xil_printf("ERR:: Interrupt Controller not found");
		return XST_DEVICE_NOT_FOUND;
	}
	Status = XScuGic_CfgInitialize(IntcInstPtr, IntcCfgPtr,
		IntcCfgPtr->CpuBaseAddress);
	if (Status != XST_SUCCESS) {
		xil_printf("Intc initialization failed!\r\n");
		return XST_FAILURE;
	}
	Xil_ExceptionInit();
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
		(Xil_ExceptionHandler) XScuGic_InterruptHandler,
		(XScuGic *)IntcInstPtr);
	return XST_SUCCESS;
}
static int SetupInterruptSystem ( void ) { int Status ; XScuGic * IntcInstPtr = & Intc ; XScuGic_Config * IntcCfgPtr ; IntcCfgPtr = XScuGic_LookupConfig ( PS_ACPU_GIC_DEVICE_ID ) ; if ( ! IntcCfgPtr ) { xil_printf ( " " ) ; return XST_DEVICE_NOT_FOUND ; } Status = XScuGic_CfgInitialize ( IntcInstPtr , IntcCfgPtr , IntcCfgPtr -> CpuBaseAddress ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } Xil_ExceptionInit ( ) ; Xil_ExceptionRegisterHandler ( XIL_EXCEPTION_ID_INT , ( Xil_ExceptionHandler ) XScuGic_InterruptHandler , ( XScuGic * ) IntcInstPtr ) ; return XST_SUCCESS ; }
This function setups the interrupt system so interrupts can occur for the
 multiscaler core.
This function setups the interrupt system so interrupts can occur for the multiscaler core .
/*
	* Initialize the interrupt controller driver so that it's ready to
	* use, specify the device ID that was generated in xparameters.h
	*/ /*
	* Register the interrupt controller handler with the exception table.
	*/