XilinxProcessorIPLib/drivers/dp14rxss/examples/xdprxss_intr_example.c
u32 DpRxSs_IntrExample(u16 DeviceId)
{
	u32 Status;
	XDpRxSs_Config *ConfigPtr;

	/* Do platform initialization in this function. This is hardware
	 * system specific. It is up to the user to implement this function.
	 */
	xil_printf("PlatformInit\n\r");
	Status = DpRxSs_PlatformInit();
	if (Status != XST_SUCCESS) {
		xil_printf("Platform init failed!\n\r");
	}
	xil_printf("Platform initialization done.\n\r");

	/* Obtain the device configuration for the DisplayPort RX Subsystem */
	ConfigPtr = XDpRxSs_LookupConfig(DeviceId);
	if (!ConfigPtr) {
		return XST_FAILURE;
	}
	/* Copy the device configuration into the DpRxSsInst's Config
	 * structure. */
	Status = XDpRxSs_CfgInitialize(&DpRxSsInst, ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		xil_printf("DPRXSS config initialization failed.\n\r");
		return XST_FAILURE;
	}

	/* Check for SST/MST support */
	if (DpRxSsInst.UsrOpt.MstSupport) {
		xil_printf("\n\rINFO:DPRXSS is MST enabled. DPRXSS can be "
			"switched to SST/MST\n\r\n\r");
	}
	else {
		xil_printf("\n\rINFO:DPRXSS is SST enabled. DPRXSS works "
			"only in SST mode.\n\r\n\r");
	}

	Status = DpRxSs_SetupIntrSystem();
	if (Status != XST_SUCCESS) {
		xil_printf("ERR: Interrupt system setup failed.\n\r");
		return XST_FAILURE;
	}

	/* Set Link rate and lane count to maximum */
	XDpRxSs_SetLinkRate(&DpRxSsInst, DPRXSS_LINK_RATE);
	XDpRxSs_SetLaneCount(&DpRxSsInst, DPRXSS_LANE_COUNT);

	/* Start DPRX Subsystem set */
	Status = XDpRxSs_Start(&DpRxSsInst);
	if (Status != XST_SUCCESS) {
		xil_printf("ERR:DPRX SS start failed\n\r");
		return XST_FAILURE;
	}

	/* Setup Video Phy, left to the user for implementation */
	DpRxSs_VideoPhyInit();

	/* Setup DPRX SS, left to the user for implementation */
	DpRxSs_Setup();

	/* Do not return in order to allow interrupt handling to run. Different
	 * types of interrupts will be detected and handled.
	 */
	while (1);

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function is the main entry point for the interrupt example using the
* XDpRxSs driver. This function will setup the system with interrupts handlers.
*
* @param	DeviceId is the unique device ID of the DisplayPort RX
*		Subsystem core.
*
* @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
*		different types interrupts.
*		Refer xdprxss.h file for more info.
*
******************************************************************************/
This function is the main entry point for the interrupt example using the
XDpRxSs driver. This function will setup the system with interrupts handlers.
This function is the main entry point for the interrupt example using the XDpRxSs driver . This function will setup the system with interrupts handlers .
u32 DpRxSs_IntrExample(u16 DeviceId)
{
	u32 Status;
	XDpRxSs_Config *ConfigPtr;
	xil_printf("PlatformInit\n\r");
	Status = DpRxSs_PlatformInit();
	if (Status != XST_SUCCESS) {
		xil_printf("Platform init failed!\n\r");
	}
	xil_printf("Platform initialization done.\n\r");
	ConfigPtr = XDpRxSs_LookupConfig(DeviceId);
	if (!ConfigPtr) {
		return XST_FAILURE;
	}
	Status = XDpRxSs_CfgInitialize(&DpRxSsInst, ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		xil_printf("DPRXSS config initialization failed.\n\r");
		return XST_FAILURE;
	}
	if (DpRxSsInst.UsrOpt.MstSupport) {
		xil_printf("\n\rINFO:DPRXSS is MST enabled. DPRXSS can be "
			"switched to SST/MST\n\r\n\r");
	}
	else {
		xil_printf("\n\rINFO:DPRXSS is SST enabled. DPRXSS works "
			"only in SST mode.\n\r\n\r");
	}
	Status = DpRxSs_SetupIntrSystem();
	if (Status != XST_SUCCESS) {
		xil_printf("ERR: Interrupt system setup failed.\n\r");
		return XST_FAILURE;
	}
	XDpRxSs_SetLinkRate(&DpRxSsInst, DPRXSS_LINK_RATE);
	XDpRxSs_SetLaneCount(&DpRxSsInst, DPRXSS_LANE_COUNT);
	Status = XDpRxSs_Start(&DpRxSsInst);
	if (Status != XST_SUCCESS) {
		xil_printf("ERR:DPRX SS start failed\n\r");
		return XST_FAILURE;
	}
	DpRxSs_VideoPhyInit();
	DpRxSs_Setup();
	while (1);
	return XST_SUCCESS;
}
u32 DpRxSs_IntrExample ( u16 DeviceId ) { u32 Status ; XDpRxSs_Config * ConfigPtr ; xil_printf ( " \n \r " ) ; Status = DpRxSs_PlatformInit ( ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n \r " ) ; } xil_printf ( " \n \r " ) ; ConfigPtr = XDpRxSs_LookupConfig ( DeviceId ) ; if ( ! ConfigPtr ) { return XST_FAILURE ; } Status = XDpRxSs_CfgInitialize ( & DpRxSsInst , ConfigPtr , ConfigPtr -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n \r " ) ; return XST_FAILURE ; } if ( DpRxSsInst . UsrOpt . MstSupport ) { xil_printf ( " \n \r " " \n \r \n \r " ) ; } else { xil_printf ( " \n \r " " \n \r \n \r " ) ; } Status = DpRxSs_SetupIntrSystem ( ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n \r " ) ; return XST_FAILURE ; } XDpRxSs_SetLinkRate ( & DpRxSsInst , DPRXSS_LINK_RATE ) ; XDpRxSs_SetLaneCount ( & DpRxSsInst , DPRXSS_LANE_COUNT ) ; Status = XDpRxSs_Start ( & DpRxSsInst ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n \r " ) ; return XST_FAILURE ; } DpRxSs_VideoPhyInit ( ) ; DpRxSs_Setup ( ) ; while ( 1 ) ; return XST_SUCCESS ; }
This function is the main entry point for the interrupt example using the
XDpRxSs driver.
This function is the main entry point for the interrupt example using the XDpRxSs driver .
/* Do platform initialization in this function. This is hardware
	 * system specific. It is up to the user to implement this function.
	 */ /* Obtain the device configuration for the DisplayPort RX Subsystem */ /* Copy the device configuration into the DpRxSsInst's Config
	 * structure. */ /* Check for SST/MST support */ /* Set Link rate and lane count to maximum */ /* Start DPRX Subsystem set */ /* Setup Video Phy, left to the user for implementation */ /* Setup DPRX SS, left to the user for implementation */ /* Do not return in order to allow interrupt handling to run. Different
	 * types of interrupts will be detected and handled.
	 */