XilinxProcessorIPLib/drivers/v_hdmitxss/examples/xhdmi_example/TxOnly/xhdmi_example.c
int SetupInterruptSystem(void) {
	int Status;
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	XScuGic *IntcInstPtr = &Intc;
#else
	XIntc *IntcInstPtr = &Intc;
#endif

	/*
	 * Initialize the interrupt controller driver so that it's ready to
	 * use, specify the device ID that was generated in xparameters.h
	 */
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	XScuGic_Config *IntcCfgPtr;
	IntcCfgPtr = XScuGic_LookupConfig(XPAR_SCUGIC_0_DEVICE_ID);
	if(IntcCfgPtr == NULL) {
		xil_printf("ERR:: Interrupt Controller not found");
		return (XST_DEVICE_NOT_FOUND);
	}
	Status = XScuGic_CfgInitialize(IntcInstPtr,
				IntcCfgPtr,
				IntcCfgPtr->CpuBaseAddress);
#else
	Status = XIntc_Initialize(IntcInstPtr, XPAR_INTC_0_DEVICE_ID);
#endif
	if (Status != XST_SUCCESS) {
		xil_printf("Intc initialization failed!\r\n");
		return XST_FAILURE;
	}


	/*
	 * Start the interrupt controller such that interrupts are recognized
	 * and handled by the processor
	 */
#if defined (__MICROBLAZE__)
	Status = XIntc_Start(IntcInstPtr, XIN_REAL_MODE);
        /* Status = XIntc_Start(IntcInstPtr, XIN_SIMULATION_MODE); */
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
#endif

	Xil_ExceptionInit();

	/*
	 * Register the interrupt controller handler with the exception table.
	 */
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XScuGic_InterruptHandler,
				(XScuGic *)IntcInstPtr);
#else
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XIntc_InterruptHandler,
				(XIntc *)IntcInstPtr);
#endif

	return (XST_SUCCESS);
}
/*****************************************************************************/
/**
*
* This function setups the interrupt system so interrupts can occur for the
* HDMI cores. The function is application-specific since the actual system
* may or may not have an interrupt controller. The HDMI cores could be
* directly connected to a processor without an interrupt controller.
* The user should modify this function to fit the application.
*
* @param  None.
*
* @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 system and no operating
*   system is used.
*
******************************************************************************/
This function setups the interrupt system so interrupts can occur for the
HDMI cores. The function is application-specific since the actual system
may or may not have an interrupt controller. The HDMI cores could be
directly connected to a processor without an interrupt controller.
The user should modify this function to fit the application.
This function setups the interrupt system so interrupts can occur for the HDMI cores . The function is application - specific since the actual system may or may not have an interrupt controller . The HDMI cores could be directly connected to a processor without an interrupt controller . The user should modify this function to fit the application .
int SetupInterruptSystem(void) {
	int Status;
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	XScuGic *IntcInstPtr = &Intc;
#else
	XIntc *IntcInstPtr = &Intc;
#endif
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	XScuGic_Config *IntcCfgPtr;
	IntcCfgPtr = XScuGic_LookupConfig(XPAR_SCUGIC_0_DEVICE_ID);
	if(IntcCfgPtr == NULL) {
		xil_printf("ERR:: Interrupt Controller not found");
		return (XST_DEVICE_NOT_FOUND);
	}
	Status = XScuGic_CfgInitialize(IntcInstPtr,
				IntcCfgPtr,
				IntcCfgPtr->CpuBaseAddress);
#else
	Status = XIntc_Initialize(IntcInstPtr, XPAR_INTC_0_DEVICE_ID);
#endif
	if (Status != XST_SUCCESS) {
		xil_printf("Intc initialization failed!\r\n");
		return XST_FAILURE;
	}
#if defined (__MICROBLAZE__)
	Status = XIntc_Start(IntcInstPtr, XIN_REAL_MODE);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
#endif
	Xil_ExceptionInit();
#if defined (ARMR5) || (__aarch64__) || (__arm__)
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XScuGic_InterruptHandler,
				(XScuGic *)IntcInstPtr);
#else
	Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT,
				(Xil_ExceptionHandler)XIntc_InterruptHandler,
				(XIntc *)IntcInstPtr);
#endif
	return (XST_SUCCESS);
}
int SetupInterruptSystem ( void ) { int Status ; #if defined ( ARMR5 ) || ( __aarch64__ ) || ( __arm__ ) XScuGic * IntcInstPtr = & Intc ; #else XIntc * IntcInstPtr = & Intc ; #endif #if defined ( ARMR5 ) || ( __aarch64__ ) || ( __arm__ ) XScuGic_Config * IntcCfgPtr ; IntcCfgPtr = XScuGic_LookupConfig ( XPAR_SCUGIC_0_DEVICE_ID ) ; if ( IntcCfgPtr == NULL ) { xil_printf ( " " ) ; return ( XST_DEVICE_NOT_FOUND ) ; } Status = XScuGic_CfgInitialize ( IntcInstPtr , IntcCfgPtr , IntcCfgPtr -> CpuBaseAddress ) ; #else Status = XIntc_Initialize ( IntcInstPtr , XPAR_INTC_0_DEVICE_ID ) ; #endif if ( Status != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } #if defined ( __MICROBLAZE__ ) Status = XIntc_Start ( IntcInstPtr , XIN_REAL_MODE ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } #endif Xil_ExceptionInit ( ) ; #if defined ( ARMR5 ) || ( __aarch64__ ) || ( __arm__ ) Xil_ExceptionRegisterHandler ( XIL_EXCEPTION_ID_INT , ( Xil_ExceptionHandler ) XScuGic_InterruptHandler , ( XScuGic * ) IntcInstPtr ) ; #else Xil_ExceptionRegisterHandler ( XIL_EXCEPTION_ID_INT , ( Xil_ExceptionHandler ) XIntc_InterruptHandler , ( XIntc * ) IntcInstPtr ) ; #endif return ( XST_SUCCESS ) ; }
This function setups the interrupt system so interrupts can occur for the
HDMI cores.
This function setups the interrupt system so interrupts can occur for the HDMI cores .
/*
	 * Initialize the interrupt controller driver so that it's ready to
	 * use, specify the device ID that was generated in xparameters.h
	 */ /*
	 * Start the interrupt controller such that interrupts are recognized
	 * and handled by the processor
	 */ /* Status = XIntc_Start(IntcInstPtr, XIN_SIMULATION_MODE); */ /*
	 * Register the interrupt controller handler with the exception table.
	 */