zdma
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xzdma.h File Reference
#include "xzdma_hw.h"
#include "xil_assert.h"
#include "xstatus.h"
#include "xil_cache.h"
#include "bspconfig.h"
#include "sleep.h"

Data Structures

struct  XZDma_Descriptor
 Holds scatter-gather descriptor fields for the ZDMA core. More...
 
struct  XZDma_LlDscr
 Holds scatter-gather descriptor fields for the ZDMA core. More...
 
struct  XZDma_LiDscr
 Holds linear descriptor fields for the ZDMA core. More...
 
struct  XZDma_DataConfig
 Holds data transfer configuration for the ZDMA core. More...
 
struct  XZDma_DscrConfig
 Holds descriptor fetch configuration for the ZDMA core. More...
 
struct  XZDma_Config
 Holds configuration information for a ZDMA core. More...
 
struct  XZDma
 The XZDma driver instance data structure. More...
 
struct  XZDma_Transfer
 Holds fields for a ZDMA data transfer. More...
 

Macros

#define XZDMA_H_
 Include guard for the ZDMA driver header. More...
 
#define XZDma_IntrGetStatus(InstancePtr)   XZDma_ReadReg((InstancePtr)->Config.BaseAddress, XZDMA_CH_ISR_OFFSET(InstancePtr))
 This function returns interrupt status read from Interrupt Status Register. More...
 
#define XZDma_IntrClear(InstancePtr, Mask)
 This function clears interrupt(s). More...
 
#define XZDma_GetIntrMask(InstancePtr)
 This function returns interrupt mask to know which interrupts are enabled and which of them were disabled. More...
 
#define XZDma_EnableIntr(InstancePtr, Mask)   (InstancePtr)->IntrMask = ((InstancePtr)->IntrMask | (Mask))
 This function enables individual interrupts of the ZDMA core by updating the Interrupt Enable register. More...
 
#define XZDma_DisableIntr(InstancePtr, Mask)
 This function disables individual interrupts of the ZDMA core by updating the Interrupt Disable register. More...
 
#define XZDma_SrcCurPyld(InstancePtr)
 This function returns source current payload address under process of ZDMA core. More...
 
#define XZDma_DstCurPyld(InstancePtr)
 This function returns destination current payload address under process of ZDMA core. More...
 
#define XZDma_SrcDscrCurPyld(InstancePtr)
 This function returns source descriptor current payload address under process of ZDMA core. More...
 
#define XZDma_DstDscrCurPyld(InstancePtr)
 This function returns destination descriptor current payload address under process of ZDMA core. More...
 
#define XZDma_GetTotalByte(InstancePtr)
 This function gets the count of total bytes transferred through core since last clear in ZDMA core. More...
 
#define XZDma_TotalByteClear(InstancePtr)
 This function clears the count of total bytes transferred in ZDMA core. More...
 
#define XZDma_GetSrcIntrCnt(InstancePtr)
 This function gets the total number of Interrupt count for source after last call of this API. More...
 
#define XZDma_GetDstIntrCnt(InstancePtr)
 This function gets the total number of Interrupt count for destination after last call of this API. More...
 
#define XZDma_EnableCh(InstancePtr)
 This function Enable's the ZDMA core for initiating the data transfer once the data transfer completes it will be automatically disabled. More...
 
#define XZDma_DisableCh(InstancePtr)
 This function Disable's the ZDMA core. More...
 

Typedefs

typedef void(* XZDma_DoneHandler )(void *CallBackRef)
 Callback type for Completion of all data transfers. More...
 
typedef void(* XZDma_ErrorHandler )(void *CallBackRef, u32 ErrorMask)
 Callback type for all error interrupts. More...
 

Enumerations

enum  XZDma_Handler { XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR }
 Defines ZDMA handler types. More...
 
enum  XZDma_DscrType { XZDMA_LINEAR, XZDMA_LINKEDLIST }
 Defines ZDMA descriptor types. More...
 
enum  XZDma_Mode { XZDMA_NORMAL_MODE, XZDMA_WRONLY_MODE, XZDMA_RDONLY_MODE }
 Defines ZDMA operation modes. More...
 
enum  XZDmaState { XZDMA_IDLE, XZDMA_PAUSE, XZDMA_BUSY }
 Defines ZDMA channel states. More...
 
enum  XZDma_BurstType { XZDMA_FIXED_BURST = 0, XZDMA_INCR_BURST }
 Defines ZDMA AXI burst types. More...
 

Functions

XZDma_Config * XZDma_LookupConfig (UINTPTR BaseAddress)
 Looks up device configuration by base address. More...
 
s32 XZDma_CfgInitialize (XZDma *InstancePtr, XZDma_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes an ZDMA core. More...
 
s32 XZDma_SetMode (XZDma *InstancePtr, u8 IsSgDma, XZDma_Mode Mode)
 This function sets the pointer type and mode in which ZDMA needs to transfer the data. More...
 
u32 XZDma_CreateBDList (XZDma *InstancePtr, XZDma_DscrType TypeOfDscr, UINTPTR Dscr_MemPtr, u32 NoOfBytes)
 This function sets the descriptor type and descriptor pointer's start address of both source and destination based on the memory allocated by user and also calculates no of descriptors(BDs) can be created in the allocated memory. More...
 
s32 XZDma_SetChDataConfig (XZDma *InstancePtr, XZDma_DataConfig *Configure)
 This function sets the data attributes and control configurations of a ZDMA core based on the inputs provided. More...
 
void XZDma_GetChDataConfig (XZDma *InstancePtr, XZDma_DataConfig *Configure)
 This function gets the data attributes and control configurations of a ZDMA core. More...
 
s32 XZDma_SetChDscrConfig (XZDma *InstancePtr, XZDma_DscrConfig *Configure)
 This function sets the descriptor attributes based on the inputs provided in the structure. More...
 
void XZDma_GetChDscrConfig (XZDma *InstancePtr, XZDma_DscrConfig *Configure)
 This function gets the descriptor attributes of the channel. More...
 
s32 XZDma_Start (XZDma *InstancePtr, XZDma_Transfer *Data, u32 Num)
 This function sets all the required fields for initiating data transfer. More...
 
void XZDma_WOData (XZDma *InstancePtr, u32 *Buffer)
 This function preloads the buffers which will be used in write only mode. More...
 
void XZDma_Resume (XZDma *InstancePtr)
 This function resume the paused state of ZDMA core and starts the transfer from where it has paused. More...
 
void XZDma_Reset (XZDma *InstancePtr)
 This function resets the ZDMA core. More...
 
XZDmaState XZDma_ChannelState (XZDma *InstancePtr)
 This function returns the state of ZDMA core. More...
 
s32 XZDma_SelfTest (XZDma *InstancePtr)
 Runs a diagnostic self-test for the ZDMA driver instance. More...
 
s32 XZDma_Stop (XZDma *InstancePtr)
 Stops the ZDMA engine and releases power management resources if supported. More...
 
void XZDma_IntrHandler (void *Instance)
 This function is the interrupt handler for the ZDMA core. More...
 
s32 XZDma_SetCallBack (XZDma *InstancePtr, XZDma_Handler HandlerType, void *CallBackFunc, void *CallBackRef)
 This routine installs an asynchronous callback function for the given HandlerType. More...
 
void XZDma_ScatterGather (XZDma *InstancePtr, XZDma_Transfer *Data, u32 Num)
 This function sets all the required fields for initiating data transfer in scatter gather mode. More...
 
void XZDma_Enable (XZDma *InstancePtr)
 This function enables all the interrupts which user intended to enable and enables the ZDMA channel for initiating data transfer. More...
 

Macro Definition Documentation

#define XZDMA_H_

Include guard for the ZDMA driver header.