zdma: xzdma_linear_example.c File Reference

| zdma Xilinx SDK Drivers API Documentation

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

Macros | Functions | Variables
xzdma_linear_example.c File Reference

## Overview

This file contains the example using XZDma driver to do data transfer in Linear mode on ZDMA device.

    MODIFICATION HISTORY:

    Ver   Who     Date     Changes

    1.0   vns     2/27/15  First release
          ms      04/05/17 Modified comment lines notation in functions to
                           avoid unnecessary description to get displayed
                           while generating doxygen.
    1.3   mus    08/14/17  Do not perform cache operations if CCI is enabled
    1.4   adk    11/02/17  Updated example to fix compilation errors for IAR
                     compiler.
    1.7   adk    21/03/19  Fix data alignment in the example for IAR compiler.

## Macros
#define | ZDMA_INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
| SCUGIC Device ID. More...
#define | ZDMA_INTR_DEVICE_ID XPAR_XADMAPS_0_INTR
| ZDMA Interrupt Id. More...

## Functions
int | XZDma_LinearExample (u16 DeviceId)
| This function does a test of the data transfer in linear mode on the ZDMA driver. More...
u32 DstBuf[256] | __attribute__ ((aligned(64)))
| Destination buffer. More...
int | main (void)
| Main function to call the example. More...

## Variables
XZDma | ZDma
| Instance of the ZDMA Device. More...
XScuGic | Intc
| XIntc Instance. More...
u8 | Done = 0
| Variable for Done interrupt. More...
u8 | Pause = 0
| Variable for Pause interrupt. More...

## Macro Definition Documentation

#define ZDMA_INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID

SCUGIC Device ID.

#define ZDMA_INTR_DEVICE_ID XPAR_XADMAPS_0_INTR

ZDMA Interrupt Id.

Referenced by XZDma_LinearExample().

## Function Documentation

u32 DstBuf [256] __attribute__ | ( | (aligned(64)) |  | ) |

Destination buffer.

memory allocated for descriptors

Source buffer.

int main | ( | void |  | ) |

Main function to call the example.

Returns
  - XST_SUCCESS if successful.
  - XST_FAILURE if failed.

Note
  None.

References XZDma_LinearExample().

int XZDma_LinearExample | ( | u16 | DeviceId | ) |

This function does a test of the data transfer in linear mode on the ZDMA driver.

Parameters

  DeviceId | is the XPAR_<ZDMA Instance>_DEVICE_ID value from xparameters.h.

Returns
  - XST_SUCCESS if successful.
  - XST_FAILURE if failed.

Note
  None.

References XZDma_Config::BaseAddress, Dst1Buf, XZDma_Transfer::DstAddr, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, Intc, XZDma_Config::IsCacheCoherent, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, XZDma_Transfer::Size, Src1Buf, XZDma_Transfer::SrcAddr, SrcBuf, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_Transfer::SrcCoherent, XZDma_DataConfig::SrcIssue, XZDma_CfgInitialize(), XZDma_CreateBDList(), XZDma_EnableIntr, XZDma_GetChDataConfig(), XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR, XZDMA_INCR_BURST, XZDMA_IXR_DMA_DONE_MASK, XZDMA_IXR_DMA_PAUSE_MASK, XZDMA_LINEAR, XZDma_LookupConfig(), XZDMA_NORMAL_MODE, XZDma_Resume(), XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), XZDma_Start(), and ZDMA_INTR_DEVICE_ID.

Referenced by main().

## Variable Documentation

u8 Done = 0

Variable for Done interrupt.

Referenced by XZDma_SimpleReadOnlyExample().

XScuGic Intc

XIntc Instance.

Referenced by main(), XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().

u8 Pause = 0

Variable for Pause interrupt.

XZDma ZDma

Instance of the ZDMA Device.