| v_sdirxss Vitis Drivers API Documentation

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

Functions | Variables
xv_sdirxss.c File Reference

## Overview

This is the main file for Xilinx SDI RX core.

Please see xv_ddirxss.h for more details of the driver.

    MODIFICATION HISTORY:

    Ver   Who    Date      Changes

    1.00  jsr    07/17/17  Initial release.
    2.00  kar    01/25/18  Second release.

## Functions
void | XV_SdiRxSS_SdiRxIntrHandler (XV_SdiRxSs *InstancePtr)
| This function calls the interrupt handler for SDI RX. More...
void | XV_SdiRxSs_ReportCoreInfo (XV_SdiRxSs *InstancePtr)
| This function reports list of cores included in Video Processing Subsystem. More...
int | XV_SdiRxSs_CfgInitialize (XV_SdiRxSs *InstancePtr, XV_SdiRxSs_Config *CfgPtr, UINTPTR EffectiveAddr)
| This function initializes the video subsystem and included sub-cores. More...
void | XV_SdiRxSs_StreamFlowEnable (XV_SdiRxSs *InstancePtr)
| This function enables the AXIS and video bridges. More...
void | XV_SdiRxSs_StreamFlowDisable (XV_SdiRxSs *InstancePtr)
| This function disables the AXIS and video bridges. More...
void | XV_SdiRxSs_Start (XV_SdiRxSs *InstancePtr, XV_SdiRx_SearchMode Mode)
| This function starts the SDI RX stream detection. More...
void | XV_SdiRxSs_Stop (XV_SdiRxSs *InstancePtr)
| This function stops the SDI RX stream detection. More...
int | XV_SdiRxSs_SetCallback (XV_SdiRxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
| This function installs an asynchronous callback function for the given HandlerType: More...
XVidC_VideoStream * | XV_SdiRxSs_GetVideoStream (XV_SdiRxSs *InstancePtr, u8 StreamId)
| This function returns the pointer to SDI RX SS video stream. More...
void | XV_SdiRxSs_SetYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr)
| This function enable the YUV444/RGB 10bit support SDI RX SS video stream. More...
void | XV_SdiRxSs_ClearYCbCr444_RGB_10bit (XV_SdiRxSs *InstancePtr)
| This function disable the YUV444/RGB 10bit support SDI RX SS video stream. More...
void | XV_SdiRxSs_ReportInfo (XV_SdiRxSs *InstancePtr)
| This function prints the SDI RX SS information. More...
void | XV_SdiRxSs_ReportDebugInfo (XV_SdiRxSs *InstancePtr)
| This function prints the SDI RX SS debug information. More...
int | XV_SdiRxSs_IsStreamUp (XV_SdiRxSs *InstancePtr)
| This function checks if the video stream is up. More...
void | XV_SdiRxSs_IntrEnable (XV_SdiRxSs *InstancePtr, u32 IntrMask)
| This function is used to configure the SDI RX interrupts that are to be handled by the application. More...
void | XV_SdiRxSs_IntrDisable (XV_SdiRxSs *InstancePtr, u32 IntrMask)
| This function is used to configure the SDI RX interrupts that are to be handled by the application. More...
u32 | XV_SdiRxSs_WaitforPayLoad (XV_SdiRxSs *InstancePtr)
| This function is used to wait for the payload valid bit to be set. More...
void | XV_SdiRxSs_HandleNoPayload (XV_SdiRxSs *InstancePtr, u8 enable)
| This function disables handling for no payload case. More...

## Variables
XV_SdiRxSs_SubCores | XV_SdiRxSs_SubCoreRepo [XPAR_XV_SDIRXSS_NUM_INSTANCES]
| Define Driver instance of all sub-core included in the design. More...

## Function Documentation

int XV_SdiRxSs_CfgInitialize | ( | XV_SdiRxSs * | InstancePtr,
|  | XV_SdiRxSs_Config * | CfgPtr,
|  | UINTPTR | EffectiveAddr
| ) |  |

This function initializes the video subsystem and included sub-cores.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state.

Parameters

  InstancePtr | is a pointer to the Subsystem instance to be worked on.
  CfgPtr | points to the configuration structure associated with the subsystem instance.
  EffectiveAddr | is the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.

Returns
  XST_SUCCESS if initialization is successful else XST_FAILURE

References XV_SdiRxSs_Config::BaseAddress, XV_SdiRxSs::Config, XV_SdiRxSs_Config::DeviceId, XV_SdiRxSs::IsReady, XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_SubcoreInitSdiRx().

Referenced by main(), and SdiRxSs_SelfTestExample().

void XV_SdiRxSs_ClearYCbCr444_RGB_10bit | ( | XV_SdiRxSs * | InstancePtr | ) |

This function disable the YUV444/RGB 10bit support SDI RX SS video stream.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None

References XV_SdiRxSs::SdiRxPtr.

XVidC_VideoStream* XV_SdiRxSs_GetVideoStream | ( | XV_SdiRxSs * | InstancePtr,
|  | u8 | StreamId
| ) |  |

This function returns the pointer to SDI RX SS video stream.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance
  StreamId | specifies which video stream's pointer to be returned

Returns
  XVidC_VideoStream pointer

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_HandleNoPayload | ( | XV_SdiRxSs * | InstancePtr,
|  | u8 | enable
| ) |  |

This function disables handling for no payload case.

Parameters

  InstancePtr | is a pointer to the XV_SdiRxSs core instance.
  enable | is to enable/disable the Handling of nopayload case

Returns
  None

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_IntrDisable | ( | XV_SdiRxSs * | InstancePtr,
|  | u32 | IntrMask
| ) |  |

This function is used to configure the SDI RX interrupts that are to be handled by the application.

Refer to xv_sdirxss_hw.h for interrupt masks.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance
  IntrMask | Indicates Mask for disabling interrupts.

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

Referenced by main().

void XV_SdiRxSs_IntrEnable | ( | XV_SdiRxSs * | InstancePtr,
|  | u32 | IntrMask
| ) |  |

This function is used to configure the SDI RX interrupts that are to be handled by the application.

Refer to xv_sdirxss_hw.h for interrupt masks.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance
  IntrMask | Indicates Mask for enable interrupts.

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

Referenced by main().

int XV_SdiRxSs_IsStreamUp | ( | XV_SdiRxSs * | InstancePtr | ) |

This function checks if the video stream is up.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  - TRUE if stream is up.
  - FALSE if stream is down.

Note
  None.

References XV_SdiRxSs::IsStreamUp.

void XV_SdiRxSs_ReportCoreInfo | ( | XV_SdiRxSs * | InstancePtr | ) |

This function reports list of cores included in Video Processing Subsystem.

Parameters

  InstancePtr | is a pointer to the Subsystem instance.

Returns
  None

References XV_SdiRxSs::SdiRxPtr.

Referenced by XV_SdiRxSs_ReportInfo().

void XV_SdiRxSs_ReportDebugInfo | ( | XV_SdiRxSs * | InstancePtr | ) |

This function prints the SDI RX SS debug information.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

Referenced by DebugInfo().

void XV_SdiRxSs_ReportInfo | ( | XV_SdiRxSs * | InstancePtr | ) |

This function prints the SDI RX SS information.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr, and XV_SdiRxSs_ReportCoreInfo().

Referenced by Info().

void XV_SdiRxSS_SdiRxIntrHandler | ( | XV_SdiRxSs * | InstancePtr | ) |

This function calls the interrupt handler for SDI RX.

Parameters

  InstancePtr | is a pointer to the SDI RX Subsystem

References XV_SdiRxSs::SdiRxPtr.

Referenced by main().

int XV_SdiRxSs_SetCallback | ( | XV_SdiRxSs * | InstancePtr,
|  | u32 | HandlerType,
|  | void * | CallbackFunc,
|  | void * | CallbackRef
| ) |  |

This function installs an asynchronous callback function for the given HandlerType:

    HandlerType                     Callback Function Type
    -----------------------         ---------------------------------------------
    (XV_SDIRXSS_HANDLER_STREAM_DOWN)         StreamDownCallback
    (XV_SDIRXSS_HANDLER_STREAM_UP)           StreamUpCallback
    (XV_SDIRXSS_HANDLER_OVERFLOW)           OverFlowCallback
    (XV_SDIRXSS_HANDLER_UNDERFLOW)           UnderFlowCallback
    (XV_SDIRXSS_HANDLER_VSYNC)                 VsyncCallback

Parameters

  InstancePtr | is a pointer to the SDI RX Subsystem instance.
  HandlerType | specifies the type of handler.
  CallbackFunc | is the address of the callback function.
  CallbackRef | is a user data item that will be passed to the callback function when it is invoked.

Returns
  - XST_SUCCESS if callback function installed successfully.
  - XST_INVALID_PARAM when HandlerType is invalid.

Note
  Invoking this function for a handler that already has been installed replaces it with the new handler.

References XV_SdiRxSs::OverFlowCallback, XV_SdiRxSs::OverFlowRef, XV_SdiRxSs::StreamDownCallback, XV_SdiRxSs::StreamDownRef, XV_SdiRxSs::StreamUpCallback, XV_SdiRxSs::StreamUpRef, XV_SdiRxSs::UnderFlowCallback, XV_SdiRxSs::UnderFlowRef, XV_SdiRxSs::VsyncCallback, XV_SdiRxSs::VsyncRef, XV_SDIRXSS_HANDLER_OVERFLOW, XV_SDIRXSS_HANDLER_STREAM_DOWN, XV_SDIRXSS_HANDLER_STREAM_UP, XV_SDIRXSS_HANDLER_UNDERFLOW, and XV_SDIRXSS_HANDLER_VSYNC.

Referenced by main().

void XV_SdiRxSs_SetYCbCr444_RGB_10bit | ( | XV_SdiRxSs * | InstancePtr | ) |

This function enable the YUV444/RGB 10bit support SDI RX SS video stream.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_Start | ( | XV_SdiRxSs * | InstancePtr,
|  | XV_SdiRx_SearchMode | Mode
| ) |  |

This function starts the SDI RX stream detection.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance
  Mode | specifies the mode of SDI modes searching operation. 0 = XV_SDIRX_SINGLESEARCHMODE_HD 1 = XV_SDIRX_SINGLESEARCHMODE_SD 2 = XV_SDIRX_SINGLESEARCHMODE_3G 4 = XV_SDIRX_SINGLESEARCHMODE_6G 5 = XV_SDIRX_SINGLESEARCHMODE_12GI 6 = XV_SDIRX_SINGLESEARCHMODE_12GF 10 = XV_SDIRX_MULTISEARCHMODE where the supported modes will be enabled by XV_SdiRx_EnableMode function

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_START, and XV_SdiRxSs_LogWrite().

void XV_SdiRxSs_Stop | ( | XV_SdiRxSs * | InstancePtr | ) |

This function stops the SDI RX stream detection.

Parameters

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

Returns
  None

References XV_SdiRxSs::SdiRxPtr, XV_SDIRXSS_LOG_EVT_STOP, and XV_SdiRxSs_LogWrite().

void XV_SdiRxSs_StreamFlowDisable | ( | XV_SdiRxSs * | InstancePtr | ) |

This function disables the AXIS and video bridges.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

void XV_SdiRxSs_StreamFlowEnable | ( | XV_SdiRxSs * | InstancePtr | ) |

This function enables the AXIS and video bridges.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  None.

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

u32 XV_SdiRxSs_WaitforPayLoad | ( | XV_SdiRxSs * | InstancePtr | ) |

This function is used to wait for the payload valid bit to be set.

This has to be called from application based on the callback indication of the video lock interrupt handler.

Parameters

  InstancePtr | pointer to XV_SdiRxSs instance

Returns
  - XST_FAILURE if the payload valid bits are not set.
  - XST_SUCCESS if ST352 registers are read and loaded to Rx structures

Note
  None.

References XV_SdiRxSs::SdiRxPtr.

## Variable Documentation

XV_SdiRxSs_SubCores XV_SdiRxSs_SubCoreRepo[XPAR_XV_SDIRXSS_NUM_INSTANCES]

Define Driver instance of all sub-core included in the design.