axivdma: vdma.c File Reference

| axivdma Xilinx SDK Drivers API Documentation

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

Functions
vdma.c File Reference

## Overview

This file comprises sample application to usage of VDMA APi's in vdma_api.c.

MODIFICATION HISTORY:

Ver Who Date Changes

4.0 adk 11/26/15 First release 4.1 adk 01/07/16 Updated DDR base address for Ultrascale (CR 799532) and removed the defines for S6/V6. ms 04/05/17 Modified Comment lines in functions to recognize it as documentation block for doxygen generation of examples.

## Functions
int | run_triple_frame_buffer (XAxiVdma *InstancePtr, int DeviceId, int hsize, int vsize, int buf_base_addr, int number_frame_count, int enable_frm_cnt_intr)
| run_triple_frame_buffer API More...
int | main ()
| Main function. More...

## Function Documentation

int main | ( | void |  | ) |

Main function.

This is main entry point to demonstrate this example.

Returns
  None

References run_triple_frame_buffer().

int run_triple_frame_buffer | ( | XAxiVdma * | InstancePtr,
|  | int | DeviceId,
|  | int | hsize,
|  | int | vsize,
|  | int | buf_base_addr,
|  | int | number_frame_count,
|  | int | enable_frm_cnt_intr
| ) |  |

run_triple_frame_buffer API

This API is the interface between application and other API. When application will call this API with right argument, This API will call rest of the API to configure the read and write path of VDMA,based on ID. After that it will start both the read and write path of VDMA

Parameters

  InstancePtr | is the handle to XAxiVdma data structure.
  DeviceId | is the device ID of current VDMA
  hsize | is the horizontal size of the frame. It will be in Pixels. The actual size of frame will be calculated by multiplying this with tdata width.
  vsize | is the Vertical size of the frame.
  buf_base_addr | is the buffer address where frames will be written and read by VDMA.
  number_frame_count | specifies after how many frames the interrupt should come.
  enable_frm_cnt_intr | is for enabling frame count interrupt when set to 1.

Returns
  - XST_SUCCESS if example finishes successfully
  - XST_FAILURE if example fails.

References XAxiVdma_Config::BaseAddress, XAxiVdma_Config::Mm2SStreamWidth, XAxiVdma_FrameCounter::ReadDelayTimerCount, XAxiVdma_FrameCounter::ReadFrameCount, XAxiVdma_FrameCounter::WriteDelayTimerCount, XAxiVdma_FrameCounter::WriteFrameCount, XAxiVdma_CfgInitialize(), XAxiVdma_IntrEnable(), XAXIVDMA_IXR_ERROR_MASK, XAXIVDMA_IXR_FRMCNT_MASK, XAxiVdma_LookupConfig(), XAXIVDMA_READ, XAxiVdma_SetFrameCounter(), and XAXIVDMA_WRITE.

Referenced by main().