dp12: xdp_tx_timer_example.c File Reference

| dp12 Xilinx SDK Drivers API Documentation

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

Functions
xdp_tx_timer_example.c File Reference

## Overview

Contains a design example using the XDp driver (operating in TX mode) with a user-defined hook for delay.

The reasoning behind this is that MicroBlaze sleep is not very accurate without a hardware timer. For systems that have a hardware timer, the user may override the default MicroBlaze sleep with a function that will use the hardware timer.

Note
  This example requires an AXI timer 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_TimerExample (XDp *InstancePtr, u16 DeviceId, XTmrCtr *TimerCounterPtr, XDp_TimerHandler UserSleepFunc)
| The main entry point for the timer example using the XDp driver. More...
int | main (void)
| This function is the main function of the XDptx timer example. More...

## Function Documentation

u32 Dptx_TimerExample | ( | XDp * | InstancePtr,
|  | u16 | DeviceId,
|  | XTmrCtr * | TimerCounterPtr,
|  | XDp_TimerHandler | UserSleepFunc
| ) |  |

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

This function will set up the system and the custom sleep handler. If this is successful, link training will commence and a video stream will start being sent over the main link.

Parameters

  InstancePtr | is a pointer to the XDp instance.
  DeviceId | is the unique device ID of the DisplayPort TX core instance.
  TimerCounterPtr | is a pointer to the timer instance.
  UserSleepFunc | is a pointer to the custom handler for sleep.

Returns
  - XST_SUCCESS if the system was set up correctly and link training was successful.
  - XST_FAILURE otherwise.

Note
  None.

References Dptx_Run(), Dptx_SetupExample(), and XDp_SetUserTimerHandler().

Referenced by main().

int main | ( | void |  | ) |

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

Parameters

  None. |

Returns
  - XST_SUCCESS if the timer example finished successfully.
  - XST_FAILURE otherwise.

Note
  None.

References Dptx_TimerExample().