vprocss: periph.h File Reference

| vprocss Xilinx SDK Drivers API Documentation

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

Data Structures | Macros | Functions
periph.h File Reference

## Overview

This is header for resource file that will initialize all system level peripherals.

    MODIFICATION HISTORY:

    Ver   Who    Date   Changes

    1.00  rc   07/07/14 First release
    2.00  dmc  12/02/15 Removed UART driver instance
               01/25/16 Support new GPIO instance to reset HLS IP inside the VPSS

## Data Structures
struct | XPeriph
| System Peripheral configuration structure. More...

## Macros
#define | XPeriph_SetTPGColorFormat(pPeriph, ColorFormat) ((pPeriph)->TpgConfig.ColorFmt = ColorFormat)
| This macro sets the TPG color format. More...
#define | XPeriph_SetTPGPattern(pPeriph, Pattern) ((pPeriph)->TpgConfig.Pattern = Pattern)
| This macro sets the TPG pattern. More...
#define | XPeriph_SetTPGWidth(pPeriph, width) ((pPeriph)->TpgConfig.Width = width)
| This macro sets TPG active width. More...
#define | XPeriph_SetTPGHeight(pPeriph, height) ((pPeriph)->TpgConfig.Height = height)
| This macro sets TPG active height. More...
#define | XPeriph_SetTPGInterlacedMode(pPeriph, mode) ((pPeriph)->TpgConfig.IsInterlaced = mode)
| This macro sets TPG Interlaced Mode. More...
#define | XPeriph_IsVideoLocked(pPeriph)
| This macro reads GPIO to check video lock status. More...

## Functions
int | XPeriph_PowerOnInit (XPeriph *InstancePtr)
| This function initializes system wide common peripherals. More...
void | XPeriph_ResetHlsIp (XPeriph *InstancePtr)
| This function resets the Hls IP block(s) More...
void | XPeriph_ReportDeviceInfo (XPeriph *InstancePtr)
| This function reports system wide common peripherals included in the design. More...
void | XPeriph_ConfigTpg (XPeriph *InstancePtr)
| This function configures TPG to user defined parameters. More...
void | XPeriph_ConfigVtc (XPeriph *InstancePtr, XVidC_VideoStream *StreamPtr, u32 PixPerClk)
| This function configures VTC to output parameters. More...
void | XPeriph_DisableTpg (XPeriph *InstancePtr)
| This function stops TPG IP. More...
void | XPeriph_SetTpgParams (XPeriph *InstancePtr, u16 width, u16 height, XVidC_ColorFormat Cformat, u16 Pattern, u16 IsInterlaced)
| This function programs TPG to user defined resolution. More...
void | XPeriph_TpgDbgReportStatus (XPeriph *InstancePtr)
| This function reports TPG Status. More...

## Macro Definition Documentation

#define XPeriph_IsVideoLocked | ( |  | pPeriph | ) |

Value:
(XGpio_DiscreteRead((pPeriph)->VidLockMonitorPtr, \
XPER_GPIO_CHANNEL_1))

This macro reads GPIO to check video lock status.

Parameters

  pPeriph | is pointer to the peripheral Instance

Returns
  T/F

#define XPeriph_SetTPGColorFormat | ( |  | pPeriph,
|  |  | ColorFormat
| ) |  | ((pPeriph)->TpgConfig.ColorFmt = ColorFormat)

This macro sets the TPG color format.

Parameters

  pPeriph | is pointer to the peripheral Instance
  ColorFormat | is the new color format

Returns
  none

Referenced by XPeriph_SetTpgParams().

#define XPeriph_SetTPGHeight | ( |  | pPeriph,
|  |  | height
| ) |  | ((pPeriph)->TpgConfig.Height = height)

This macro sets TPG active height.

Parameters

  pPeriph | is pointer to the peripheral Instance
  height | is the new active height

Returns
  none

Referenced by XPeriph_SetTpgParams().

#define XPeriph_SetTPGInterlacedMode | ( |  | pPeriph,
|  |  | mode
| ) |  | ((pPeriph)->TpgConfig.IsInterlaced = mode)

This macro sets TPG Interlaced Mode.

Parameters

  pPeriph | is pointer to the peripheral Instance
  mode | is the interlace mode T/F

Returns
  none

Referenced by XPeriph_SetTpgParams().

#define XPeriph_SetTPGPattern | ( |  | pPeriph,
|  |  | Pattern
| ) |  | ((pPeriph)->TpgConfig.Pattern = Pattern)

This macro sets the TPG pattern.

Parameters

  pPeriph | is pointer to the peripheral Instance
  pattern | is the new pattern id

Returns
  none

Referenced by XPeriph_SetTpgParams().

#define XPeriph_SetTPGWidth | ( |  | pPeriph,
|  |  | width
| ) |  | ((pPeriph)->TpgConfig.Width = width)

This macro sets TPG active width.

Parameters

  pPeriph | is pointer to the peripheral Instance
  width | is the new active width

Returns
  none

Referenced by XPeriph_SetTpgParams().

## Function Documentation

void XPeriph_ConfigTpg | ( | XPeriph * | InstancePtr | ) |

This function configures TPG to user defined parameters.

Parameters

  InstancePtr | is a pointer to the peripheral instance

void XPeriph_ConfigVtc | ( | XPeriph * | InstancePtr,
|  | XVidC_VideoStream * | StreamPtr,
|  | u32 | PixPerClk
| ) |  |

This function configures VTC to output parameters.

Parameters

  InstancePtr | is a pointer to the peripheral instance
  StreamPtr | is a pointer output stream

void XPeriph_DisableTpg | ( | XPeriph * | InstancePtr | ) |

This function stops TPG IP.

Parameters

  InstancePtr | is a pointer to the peripheral instance

int XPeriph_PowerOnInit | ( | XPeriph * | InstancePtr | ) |

This function initializes system wide common peripherals.

Parameters

  InstancePtr | is a pointer to the Subsystem instance to be worked on.

Returns
  XST_SUCCESS

References XPeriph_ResetHlsIp().

Referenced by XSys_Init().

void XPeriph_ReportDeviceInfo | ( | XPeriph * | InstancePtr | ) |

This function reports system wide common peripherals included in the design.

Parameters

  InstancePtr | is a pointer to the Subsystem instance to be worked on.

Referenced by XSys_ReportSystemInfo().

void XPeriph_ResetHlsIp | ( | XPeriph * | InstancePtr | ) |

This function resets the Hls IP block(s)

Parameters

  InstancePtr | is a pointer to the peripheral instance

Referenced by XPeriph_PowerOnInit().

void XPeriph_SetTpgParams | ( | XPeriph * | InstancePtr,
|  | u16 | width,
|  | u16 | height,
|  | XVidC_ColorFormat | Cformat,
|  | u16 | Pattern,
|  | u16 | IsInterlaced
| ) |  |

This function programs TPG to user defined resolution.

Parameters

  InstancePtr | is a pointer to the peripheral instance
  width | is the new active width
  height | is the new active height

References XPeriph_SetTPGColorFormat, XPeriph_SetTPGHeight, XPeriph_SetTPGInterlacedMode, XPeriph_SetTPGPattern, and XPeriph_SetTPGWidth.

void XPeriph_TpgDbgReportStatus | ( | XPeriph * | InstancePtr | ) |

This function reports TPG Status.

Parameters

  InstancePtr | is a pointer to the peripheral instance