dp
Xilinx SDK Drivers API Documentation
xdp_tx_poll_example.c File Reference

Overview

Contains a design example using the XDp driver (operating in TX mode) with polling.

Once the polling detects a Hot-Plug-Detect event (HPD - DisplayPort cable is plugged/unplugged or the monitor is turned on/off), the main link will be trained.

Note
For this example to display output, the user will need to implement initialization of the system (Dptx_PlatformInit) and, after training is complete, implement configuration of the video stream source in order to provide the DisplayPort core with input (Dptx_StreamSrc* - called in xdp_tx_example_common.c). See XAPP1178 for reference.
The functions Dptx_PlatformInit and Dptx_StreamSrc* are declared extern in xdp_tx_example_common.h and are left up to the user to implement.
MODIFICATION HISTORY:
Ver   Who  Date     Changes

1.0 als 01/20/15 Initial creation. 5.1 ms 01/23/17 Added xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028.

Functions

u32 Dptx_PollExample (XDp *InstancePtr, u16 DeviceId)
 The main entry point for the polling example using the XDp driver. More...
 
int main (void)
 This function is the main function of the XDp polling example. More...
 

Function Documentation

◆ Dptx_PollExample()

u32 Dptx_PollExample ( XDp InstancePtr,
u16  DeviceId 
)

The main entry point for the polling example using the XDp driver.

This function will set up the system. If this is successful, this example will begin polling the Hot-Plug-Detect (HPD) status registers for HPD events. Once a connection event or a pulse is detected, link training will commence (if needed) and a video stream will start being sent over the main link.

Parameters
InstancePtris a pointer to the XDp instance.
DeviceIdis the unique device ID of the DisplayPort TX core instance.
Returns
  • 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 polling taking place for HPD events.

Referenced by main().

◆ main()

int main ( void  )

This function is the main function of the XDp polling example.

Parameters
None.
Returns
  • XST_FAILURE if the polling example was unsuccessful - system setup failed.
Note
Unless setup failed, main will never return since Dptx_PollExample is blocking (it is continuously polling for Hot-Plug-Detect (HPD) events.

References Dptx_PollExample().