v_sditxss: xsdi_example.c File Reference

| v_sditxss Xilinx SDK Drivers API Documentation

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

Macros | Functions | Variables
xsdi_example.c File Reference

## Overview

This file demonstrates how to use Xilinx SDI Rx Subsystem for standalone.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.00  ssh    07/05/18 Initial release.

## Macros
#define | I2C_MUX_ADDR 0x74
| I2C Mux Address. More...
#define | I2C_CLK_ADDR 0x69
| I2C Clk Address. More...
#define | I2C_CLK_ADDR_570 0x5D
| I2C Clk Address for Si570. More...

## Functions
void | ClearScreen (void)
| This function Clears Uart terminal screen. More...
void | RxStreamUpCallback (void *CallbackRef)
| This function is called when the RX Lock occurs, it calculates the frequency wrt RxTransMode, programs SI570 with the calculated frequency and then enables Rx stream flow IPs. More...
void | RxStreamDownCallback (void *CallbackRef)
| This function is called when the RX loses lock, and it stops SDI Tx Subsystem. More...
void | StartTxAfterRx (void)
| This function is called to start the TX stream after the RX stream was up and running. More...
int | Si570_SetClock (u32 IICBaseAddress, u8 IICAddress1, u32 RxRefClk)
| Set the output frequency of the Si570 clock generator. More...
void | Info (void)
| This function outputs the video information on TX and RX. More...
void | DebugInfo (void)
| This function outputs the debug information. More...
int | main (void)
| Main function to call example with SDI TX and SDI RX drivers. More...

## Variables
XSdi_Menu | SdiMenu
| Menu structure. More...

## Macro Definition Documentation

#define I2C_CLK_ADDR 0x69

I2C Clk Address.

#define I2C_CLK_ADDR_570 0x5D

I2C Clk Address for Si570.

Referenced by main(), and RxStreamUpCallback().

#define I2C_MUX_ADDR 0x74

I2C Mux Address.

## Function Documentation

void ClearScreen | ( | void |  | ) |

This function Clears Uart terminal screen.

Returns
  None

Note
  None.

< Clear Sreen

< Bring Cursor to 0,0

Referenced by main().

void DebugInfo | ( | void |  | ) |

This function outputs the debug information.

Returns
  None.

Note
  None.

References XV_SdiTxSs_ReportDebugInfo().

void Info | ( | void |  | ) |

This function outputs the video information on TX and RX.

Returns
  None.

Note
  None.

References XV_SdiTxSs_ReportInfo().

int main | ( | void |  | ) |

Main function to call example with SDI TX and SDI RX drivers.

Returns
  - XST_SUCCESS if SDI example was successfully.
  - XST_FAILURE if SDI example failed.

Note
  None.

References XV_SdiTxSs_Config::BaseAddress, ClearScreen(), I2C_CLK_ADDR_570, XV_SdiTxSs::IsReady, RxStreamDownCallback(), RxStreamUpCallback(), Si570_SetClock(), StartTxAfterRx(), XSdi_MenuInitialize(), XSdi_MenuProcess(), XV_SdiTxSs_CfgInitialize(), XV_SDITXSS_HANDLER_GTREADY, XV_SdiTxSs_IntrDisable(), XV_SdiTxSs_IntrEnable(), XV_SdiTxSs_LookupConfig(), XV_SdiTxSS_SdiTxIntrHandler(), XV_SdiTxSs_SetCallback(), and XV_SdiTxSs_SetCoreSettings().

void RxStreamDownCallback | ( | void * | CallbackRef | ) |

This function is called when the RX loses lock, and it stops SDI Tx Subsystem.

Parameters

  CallbackRef | is a callback function reference.

Returns
  None.

Note
  None.

References XV_SdiTxSs_Stop().

Referenced by main().

void RxStreamUpCallback | ( | void * | CallbackRef | ) |

This function is called when the RX Lock occurs, it calculates the frequency wrt RxTransMode, programs SI570 with the calculated frequency and then enables Rx stream flow IPs.

Parameters

  CallbackRef | is a callback function reference.

Returns
  None.

Note
  None.

References I2C_CLK_ADDR_570, and Si570_SetClock().

Referenced by main().

int Si570_SetClock | ( | u32 | IICBaseAddress,
|  | u8 | IICAddress1,
|  | u32 | RxRefClk
| ) |  |

Set the output frequency of the Si570 clock generator.

Parameters

  IICBaseAddress | contains the base address of the IIC master device.
  IICAddress1 | contains the 7 bit IIC address of the Si570 device.
  RxRefClk | contains the value to be written in Si570 register for that particular clock frequency.

Returns
  SI570_SUCCESS for success
  SI570_ERR_IIC for IIC access failure,
  SI570_ERR_FREQ when the requested frequency cannot be generated
  SI570_ERR_PARM when the ClkSrc or ClkDest parameters are invalid or the ClkInFreq or ClkOutFreq are out of range.

References SI570_DEBUG, and Si570_DoSettings().

Referenced by main(), and RxStreamUpCallback().

void StartTxAfterRx | ( | void |  | ) |

This function is called to start the TX stream after the RX stream was up and running.

Returns
  None.

Note
  None.

References XV_SdiTxSs_GetPayloadId(), XV_SdiTxSs_GetTransport(), XV_SdiTxSs_GetVideoStream(), and XV_SdiTxSs_StreamConfig().

Referenced by main().

## Variable Documentation

XSdi_Menu SdiMenu

Menu structure.