XilinxProcessorIPLib/drivers/audio_formatter/examples/xaudioformatter_intr_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(XPAR_PSU_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;
}
/************************** Function Definitions *****************************/
/*****************************************************************************/
/**
 **
 ** This function setups the interrupt system so interrupts can occur for the
 ** audio formatter 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.
 **
*******************************************************************************/
Function Definitions
This function setups the interrupt system so interrupts can occur for the
audio formatter 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.
Function Definitions This function setups the interrupt system so interrupts can occur for the audio formatter 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(XPAR_PSU_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 ( XPAR_PSU_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 ; }
Function Definitions
 This function setups the interrupt system so interrupts can occur for the
 audio formatter core.
Function Definitions This function setups the interrupt system so interrupts can occur for the audio formatter 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.
	**/