v_sditx: xv_sditx_intr.c File Reference

| v_sditx Xilinx SDK Drivers API Documentation

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

Functions
xv_sditx_intr.c File Reference

## Overview

This file contains interrupt related functions for Xilinx SDI TX core.

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

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.0   jsr    07/17/17 Initial release.

## Functions
u32 | XV_SdiTx_GetIntrEnable (XV_SdiTx *InstancePtr)
| This function will get the interrupt mask set (enabled) in the SDI Tx core. More...
u32 | XV_SdiTx_GetIntrStatus (XV_SdiTx *InstancePtr)
| This function will get the list of interrupts pending in the Interrupt Status Register of the SDI Tx core. More...
void | XV_SdiTx_InterruptClear (XV_SdiTx *InstancePtr, u32 Mask)
| This function will clear the interrupts set in the Interrupt Status Register of the SDI Tx core. More...
void | XV_SdiTx_IntrHandler (void *InstancePtr)
| This function is the interrupt handler for the SDI TX driver. More...
int | XV_SdiTx_SetCallback (XV_SdiTx *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
| This function installs an asynchronous callback function for the given HandlerType: More...
void | XV_SdiTx_IntrEnable (XV_SdiTx *InstancePtr, u32 Mask)
| This function enables the selected interrupt. More...
void | XV_SdiTx_IntrDisable (XV_SdiTx *InstancePtr, u32 Mask)
| This function disables the selected interrupt. More...

## Function Documentation

u32 XV_SdiTx_GetIntrEnable | ( | XV_SdiTx * | InstancePtr | ) |

This function will get the interrupt mask set (enabled) in the SDI Tx core.

Parameters

  InstancePtr | is the XV_SdiTx instance to operate on

Returns
  Interrupt Mask with bits set for corresponding interrupt in Interrupt enable register

Note
  None

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.

u32 XV_SdiTx_GetIntrStatus | ( | XV_SdiTx * | InstancePtr | ) |

This function will get the list of interrupts pending in the Interrupt Status Register of the SDI Tx core.

Parameters

  InstancePtr | is the XV_SdiTx instance to operate on

Returns
  Interrupt Mask with bits set for corresponding interrupt in Interrupt Status register

Note
  None

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_ReadReg.

Referenced by XV_SdiTx_IntrHandler().

void XV_SdiTx_InterruptClear | ( | XV_SdiTx * | InstancePtr,
|  | u32 | Mask
| ) |  |

This function will clear the interrupts set in the Interrupt Status Register of the SDI Tx core.

Parameters

  InstancePtr | is the XV_SdiTx instance to operate on
  Mask | is Interrupt Mask with bits set for corresponding interrupt to be cleared in the Interrupt Status register

Returns
  None

Note
  None

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx_ReadReg, and XV_SdiTx_WriteReg.

Referenced by XV_SdiTx_IntrHandler().

void XV_SdiTx_IntrDisable | ( | XV_SdiTx * | InstancePtr,
|  | u32 | Mask
| ) |  |

This function disables the selected interrupt.

Parameters

  InstancePtr | is a pointer to the XV_SdiTx core instance.
  Mask | to be disabled.

Returns
  None.

Note
  None.

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, and XV_SdiTx_WriteReg.

void XV_SdiTx_IntrEnable | ( | XV_SdiTx * | InstancePtr,
|  | u32 | Mask
| ) |  |

This function enables the selected interrupt.

Parameters

  InstancePtr | is a pointer to the XV_SdiTx core instance.
  Mask | to be enabled.

Returns
  None.

Note
  None.

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx_ReadReg, and XV_SdiTx_WriteReg.

void XV_SdiTx_IntrHandler | ( | void * | InstancePtr | ) |

This function is the interrupt handler for the SDI TX driver.

This handler reads the pending interrupt for GT reset done interrupt from Tx IP, determines the source of the interrupts, clears the interrupts and calls callbacks accordingly.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XV_SdiTx_SetCallback() during initialization phase. An example delivered with this driver demonstrates how this could be done.

Parameters

  InstancePtr | is a pointer to the XV_SdiTx instance that just interrupted.

Returns
  None.

Note
  None.

References XV_SdiTx_Config::BaseAddress, XV_SdiTx::Config, XV_SdiTx::IsReady, XV_SdiTx_GetIntrStatus(), XV_SdiTx_InterruptClear(), and XV_SdiTx_ReadReg.

int XV_SdiTx_SetCallback | ( | XV_SdiTx * | InstancePtr,
|  | u32 | HandlerType,
|  | void * | CallbackFunc,
|  | void * | CallbackRef
| ) |  |

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

    HandlerType                       Callback Function Type
    -------------------------         -------------------------------------------
    (XV_SDITX_HANDLER_GTRESET_DONE) GtRstDoneCallback
    (XV_SDITX_HANDLER_OVERFLOW)             OverFlowCallback
    (XV_SDITX_HANDLER_UNDERFLOW)            UnderFlowCallback

Parameters

  InstancePtr | is a pointer to the SDI TX core 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_SdiTx::Axi4sVidLockCallback, XV_SdiTx::Axi4sVidLockRef, XV_SdiTx::CeAlignErrCallback, XV_SdiTx::CeAlignErrRef, XV_SdiTx::GtRstDoneCallback, XV_SdiTx::GtRstDoneRef, XV_SdiTx::OverFlowCallback, XV_SdiTx::OverFlowRef, XV_SdiTx::UnderFlowCallback, and XV_SdiTx::UnderFlowRef.