zdma
Xilinx SDK Drivers API Documentation
xzdma.h File Reference

Data Structures

struct  XZDma_Descriptor
 This typedef contains scatter gather descriptor fields for ZDMA core. More...
 
struct  __attribute__
 This typedef contains scatter gather descriptor fields for ZDMA core. More...
 
struct  __attribute__
 This typedef contains scatter gather descriptor fields for ZDMA core. More...
 
struct  XZDma_DataConfig
 This typedef contains the data configurations of ZDMA core. More...
 
struct  XZDma_DscrConfig
 This typedef contains the descriptor configurations of ZDMA core. More...
 
struct  XZDma_Config
 This typedef contains configuration information for a ZDMA core Each ZDMA core should have a configuration structure associated. More...
 
struct  XZDma
 The XZDma driver instance data structure. More...
 
struct  XZDma_Transfer
 This typedef contains the fields for transfer of data. More...
 

Macros

#define XZDma_IntrGetStatus(InstancePtr)   XZDma_ReadReg((InstancePtr)->Config.BaseAddress, XZDMA_CH_ISR_OFFSET)
 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

ZDMA Handler Types
enum  XZDma_Handler { XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR }
 
ZDMA Descriptors Types
enum  XZDma_DscrType { XZDMA_LINEAR, XZDMA_LINKEDLIST }
 
ZDMA Operation modes
enum  XZDma_Mode { XZDMA_NORMAL_MODE, XZDMA_WRONLY_MODE, XZDMA_RDONLY_MODE }
 
ZDMA state
enum  XZDmaState { XZDMA_IDLE, XZDMA_PAUSE, XZDMA_BUSY }
 
ZDMA AXI Burst type
enum  XZDma_BurstType { XZDMA_FIXED_BURST = 0, XZDMA_INCR_BURST }
 

Functions

XZDma_ConfigXZDma_LookupConfig (u16 DeviceId)
 XZDma_LookupConfig returns a reference to an XZDma_Config structure based on the unique device id, DeviceId. 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)
 This file contains a diagnostic self-test function for the ZDMA driver. 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...