XilinxProcessorIPLib/drivers/dppsu/examples/xdppsu_intr_example.c
u32 DpPsu_IntrExample(XDpPsu *InstancePtr, u16 DeviceId, INTC *IntcPtr,
		u16 IntrId, u16 DpIntrId, XDpPsu_HpdEventHandler HpdEventHandler,
		XDpPsu_HpdPulseHandler HpdPulseHandler)
{
	u32 Status;

	/* Do platform initialization here. This is hardware system specific -
	 * it is up to the user to implement this function. */
	DpPsu_PlatformInit();
	/******************/

	Status = DpPsu_SetupExample(InstancePtr, DeviceId);
	if (Status != XST_SUCCESS) {
		xil_printf("----------------------\n");

		return XST_FAILURE;
	}

	/* Setup interrupt handling in the system. */
	Status = DpPsu_SetupInterruptHandler(InstancePtr, IntcPtr, IntrId,
	DpIntrId, HpdEventHandler, HpdPulseHandler);
	if (Status != XST_SUCCESS) {
		xil_printf("=======================\n");

		return XST_FAILURE;
	}
	/* Do not return in order to allow interrupt handling to run. HPD events
	 * (connect, disconnect, and pulse) will be detected and handled. */
	while (1);

	return XST_SUCCESS;
}
/******************************************************************************/
/**
 * The main entry point for the interrupt example using the XDpPsu driver. This
 * function will set up the system with interrupts and set up the Hot-Plug-Event
 * (HPD) handlers.
 *
 * @param	InstancePtr is a pointer to the XDpPsu instance.
 * @param	DeviceId is the unique device ID of the DisplayPort TX core
 *		instance.
 * @param	IntcPtr is a pointer to the interrupt instance.
 * @param	IntrId is the unique device ID of the interrupt controller.
 * @param	DpIntrId is the interrupt ID of the DisplayPort TX connection to
 *		the interrupt controller.
 * @param	HpdEventHandler is a pointer to the handler called when an HPD
 *		event occurs.
 * @param	HpdPulseHandler is a pointer to the handler called when an HPD
 *		pulse occurs.
 *
 * @return
 *		- XST_FAILURE if the system setup failed.
 *		- XST_SUCCESS should never return since this function, if setup
 *		  was successful, is blocking.
 *
 * @note	If system setup was successful, this function is blocking in
 *		order to illustrate interrupt handling taking place for HPD
 *		events.
 *
*******************************************************************************/
The main entry point for the interrupt example using the XDpPsu driver. This
function will set up the system with interrupts and set up the Hot-Plug-Event
(HPD) handlers.

@param       InstancePtr is a pointer to the XDpPsu instance.
@param       DeviceId is the unique device ID of the DisplayPort TX core
instance.
@param       IntcPtr is a pointer to the interrupt instance.
@param       IntrId is the unique device ID of the interrupt controller.
@param       DpIntrId is the interrupt ID of the DisplayPort TX connection to
the interrupt controller.
@param       HpdEventHandler is a pointer to the handler called when an HPD
event occurs.
@param       HpdPulseHandler is a pointer to the handler called when an HPD
pulse occurs.

@return
- XST_FAILURE if the system setup failed.
- XST_SUCCESS should never return since this function, if setup
was successful, is blocking.

@note        If system setup was successful, this function is blocking in
order to illustrate interrupt handling taking place for HPD
events.
The main entry point for the interrupt example using the XDpPsu driver . This function will set up the system with interrupts and set up the Hot - Plug - Event ( HPD ) handlers . @param InstancePtr is a pointer to the XDpPsu instance . @param DeviceId is the unique device ID of the DisplayPort TX core instance . @param IntcPtr is a pointer to the interrupt instance . @param IntrId is the unique device ID of the interrupt controller . @param DpIntrId is the interrupt ID of the DisplayPort TX connection to the interrupt controller . @param HpdEventHandler is a pointer to the handler called when an HPD event occurs . @param HpdPulseHandler is a pointer to the handler called when an HPD pulse occurs . @return - XST_FAILURE if the system setup failed . - XST_SUCCESS should never return since this function if setup was successful is blocking . @note If system setup was successful this function is blocking in order to illustrate interrupt handling taking place for HPD events .
u32 DpPsu_IntrExample(XDpPsu *InstancePtr, u16 DeviceId, INTC *IntcPtr,
		u16 IntrId, u16 DpIntrId, XDpPsu_HpdEventHandler HpdEventHandler,
		XDpPsu_HpdPulseHandler HpdPulseHandler)
{
	u32 Status;
	DpPsu_PlatformInit();
	Status = DpPsu_SetupExample(InstancePtr, DeviceId);
	if (Status != XST_SUCCESS) {
		xil_printf("----------------------\n");
		return XST_FAILURE;
	}
	Status = DpPsu_SetupInterruptHandler(InstancePtr, IntcPtr, IntrId,
	DpIntrId, HpdEventHandler, HpdPulseHandler);
	if (Status != XST_SUCCESS) {
		xil_printf("=======================\n");
		return XST_FAILURE;
	}
	while (1);
	return XST_SUCCESS;
}
u32 DpPsu_IntrExample ( XDpPsu * InstancePtr , u16 DeviceId , INTC * IntcPtr , u16 IntrId , u16 DpIntrId , XDpPsu_HpdEventHandler HpdEventHandler , XDpPsu_HpdPulseHandler HpdPulseHandler ) { u32 Status ; DpPsu_PlatformInit ( ) ; Status = DpPsu_SetupExample ( InstancePtr , DeviceId ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n " ) ; return XST_FAILURE ; } Status = DpPsu_SetupInterruptHandler ( InstancePtr , IntcPtr , IntrId , DpIntrId , HpdEventHandler , HpdPulseHandler ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n " ) ; return XST_FAILURE ; } while ( 1 ) ; return XST_SUCCESS ; }
The main entry point for the interrupt example using the XDpPsu driver.
The main entry point for the interrupt example using the XDpPsu driver .
/* Do platform initialization here. This is hardware system specific -
	 * it is up to the user to implement this function. */ /******************/ /* Setup interrupt handling in the system. */ /* Do not return in order to allow interrupt handling to run. HPD events
	 * (connect, disconnect, and pulse) will be detected and handled. */