dp14: xdp_tx_intr_example.c File Reference

| dp14 Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xdp_tx_intr_example.c File Reference

## Overview

Contains a design example using the XDp driver (operating in TX mode) 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 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_IntrExample (XDp *InstancePtr, u16 DeviceId, INTC *IntcPtr, u16 IntrId, u16 DpIntrId, XDp_IntrHandler HpdEventHandler, XDp_IntrHandler HpdPulseHandler)
| The main entry point for the interrupt example using the XDp driver. More...
int | main (void)
| This function is the main function of the XDptx interrupt example. More...

## Function Documentation

u32 Dptx_IntrExample | ( | XDp * | InstancePtr,
|  | u16 | DeviceId,
|  | INTC * | IntcPtr,
|  | u16 | IntrId,
|  | u16 | DpIntrId,
|  | XDp_IntrHandler | HpdEventHandler,
|  | XDp_IntrHandler | HpdPulseHandler
| ) |  |

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

This function will set up the system with interrupts and set up the Hot-Plug-Event (HPD) handlers.

Parameters

  InstancePtr | is a pointer to the XDp instance.
  DeviceId | is the unique device ID of the DisplayPort TX core instance.
  IntcPtr | is a pointer to the interrupt instance.
  IntrId | is the unique device ID of the interrupt controller.
  DpIntrId | is the interrupt ID of the DisplayPort TX connection to the interrupt controller.
  HpdEventHandler | is a pointer to the handler called when an HPD event occurs.
  HpdPulseHandler | is 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 Dptx_SetupExample().

Referenced by main().

int main | ( | void |  | ) |

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

If the DptxIntrExample 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 DptxIntrExample is blocking (it is waiting on interrupts for Hot-Plug-Detect (HPD) events.

References Dptx_IntrExample().