dppsu
Vitis Drivers API Documentation
xdppsu_intr_example.c File Reference

Overview

Contains a design example using the XDpPsu driver with interrupts.

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

Note
This example requires an interrupt controller connected to the processor and the DisplayPort TX core in the system.
For this example to display output, the user will need to select the Test Pattern Generator or initialize and select an appropriate source.
The functions DpPsu_PlatformInit and DpPsu_StreamSrc* are declared extern in xdppsu_common_example.h and are left up to the user to implement.
MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 aad 09/04/17 Initial creation.

Functions

u32 DpPsu_IntrExample (XDpPsu *InstancePtr, u16 DeviceId, INTC *IntcPtr, u16 IntrId, u16 DpIntrId, XDpPsu_HpdEventHandler HpdEventHandler, XDpPsu_HpdPulseHandler HpdPulseHandler)
 The main entry point for the interrupt example using the XDpPsu driver. More...
 
int main (void)
 This function is the main function of the XDpPsu interrupt example. More...
 

Function Documentation

u32 DpPsu_IntrExample ( XDpPsu InstancePtr,
u16  DeviceId,
INTC *  IntcPtr,
u16  IntrId,
u16  DpIntrId,
XDpPsu_HpdEventHandler  HpdEventHandler,
XDpPsu_HpdPulseHandler  HpdPulseHandler 
)

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.

Parameters
InstancePtris a pointer to the XDpPsu instance.
DeviceIdis the unique device ID of the DisplayPort TX core instance.
IntcPtris a pointer to the interrupt instance.
IntrIdis the unique device ID of the interrupt controller.
DpIntrIdis the interrupt ID of the DisplayPort TX connection to the interrupt controller.
HpdEventHandleris a pointer to the handler called when an HPD event occurs.
HpdPulseHandleris a pointer to the handler called when an HPD pulse occurs.
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 interrupt handling taking place for HPD events.

References DpPsu_SetupExample().

Referenced by main().

int main ( void  )

This function is the main function of the XDpPsu interrupt example.

If the DpPsuIntrExample function, which sets up the system succeeds, this function will wait for interrupts. Once a connection event or pulse is detected, link training will commence (if needed) and a video stream will start being sent over the main link.

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

References DpPsu_IntrExample().