axivdma
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
xaxivdma.h File Reference
#include "xaxivdma_hw.h"
#include "xaxivdma_i.h"
#include "xstatus.h"
#include "xil_assert.h"

Data Structures

struct  XAxiVdma_Config
 Holds hardware configuration for a VDMA device. More...
 
struct  XAxiVdma_DmaSetup
 Holds settings to start a frame read or write transfer. More...
 
struct  XAxiVdma_FrameCounter
 Holds frame counter interrupt threshold settings. More...
 
struct  XAxiVdma_ChannelCallBack
 Holds channel callback function pointers. More...
 
struct  XAxiVdma
 Holds driver instance data for a VDMA engine. More...
 

Macros

#define XAXIVDMA_H_   /* by using protection macros */
 Include guard for the AXI VDMA driver header. More...
 
#define XAXIVDMA_WRITE   1
 VDMA data transfer direction. More...
 
#define XAXIVDMA_READ   2
 DMA transfer from memory. More...
 
#define XAXIVDMA_CHAN_FSYNC   0
 Frame Sync Source Selection. More...
 
#define XAXIVDMA_CHAN_OTHER_FSYNC   1
 Other channel frame sync. More...
 
#define XAXIVDMA_S2MM_TUSER_FSYNC   2
 S2MM TUSER frame sync. More...
 
#define XAXIVDMA_EXTERNAL_GENLOCK   0
 GenLock Source Selection. More...
 
#define XAXIVDMA_INTERNAL_GENLOCK   1
 Internal genlock source. More...
 
#define XAXIVDMA_GENLOCK_MASTER   0
 GenLock Mode Constants. More...
 
#define XAXIVDMA_GENLOCK_SLAVE   1
 Genlock slave mode. More...
 
#define XAXIVDMA_DYN_GENLOCK_MASTER   2
 Dynamic genlock master mode. More...
 
#define XAXIVDMA_DYN_GENLOCK_SLAVE   3
 Dynamic genlock slave mode. More...
 
#define XAXIVDMA_HANDLER_GENERAL   1
 Interrupt type for setting up callback. More...
 
#define XAXIVDMA_HANDLER_ERROR   2
 Error Interrupt Type. More...
 
#define XAXIVDMA_DEVICE_READY   0x11111111
 Flag to signal that device is ready to be used. More...
 
#define XAXIVDMA_ENABLE_DBG_THRESHOLD_REG   0x01
 Debug Configuration Parameter Constants (C_ENABLE_DEBUG_INFO_*) More...
 
#define XAXIVDMA_ENABLE_DBG_FRMSTORE_REG   0x02
 Enable debug frame store register. More...
 
#define XAXIVDMA_ENABLE_DBG_FRM_CNTR   0x04
 Enable debug frame counter. More...
 
#define XAXIVDMA_ENABLE_DBG_DLY_CNTR   0x08
 Enable debug delay counter. More...
 
#define XAXIVDMA_ENABLE_DBG_ALL_FEATURES   0x0F
 Enable all debug features. More...
 
#define XST_VDMA_MISMATCH_ERROR   1430
 Frame or line mismatch error status code for backward compatibility. More...
 

Typedefs

typedef void(* XAxiVdma_CallBack )(void *CallBackRef, u32 InterruptTypes)
 Callback type for general interrupts. More...
 
typedef void(* XAxiVdma_ErrorCallBack )(void *CallBackRef, u32 ErrorMask)
 Callback type for error interrupts. More...
 

Functions

XAxiVdma_Config * XAxiVdma_LookupConfig (UINTPTR BaseAddress)
 Looks up the device configuration based on the unique device ID/BaseAddress. More...
 
int XAxiVdma_CfgInitialize (XAxiVdma *InstancePtr, XAxiVdma_Config *CfgPtr, UINTPTR EffectiveAddr)
 Initializes the driver with hardware configuration. More...
 
void XAxiVdma_Reset (XAxiVdma *InstancePtr, u16 Direction)
 Provides function resets one DMA channel. More...
 
int XAxiVdma_ResetNotDone (XAxiVdma *InstancePtr, u16 Direction)
 Provides function checks one DMA channel for reset completion. More...
 
int XAxiVdma_IsBusy (XAxiVdma *InstancePtr, u16 Direction)
 Checks whether a DMA channel is busy. More...
 
u32 XAxiVdma_CurrFrameStore (XAxiVdma *InstancePtr, u16 Direction)
 Gets the current frame that hardware is working on. More...
 
u32 XAxiVdma_GetVersion (XAxiVdma *InstancePtr)
 Gets the version of the hardware. More...
 
u32 XAxiVdma_GetStatus (XAxiVdma *InstancePtr, u16 Direction)
 Gets the status of a channel. More...
 
int XAxiVdma_SetLineBufThreshold (XAxiVdma *InstancePtr, int LineBufThreshold, u16 Direction)
 Configures Line Buffer Threshold. More...
 
int XAxiVdma_StartParking (XAxiVdma *InstancePtr, int FrameIndex, u16 Direction)
 Starts parking mode on a certain frame. More...
 
void XAxiVdma_StopParking (XAxiVdma *InstancePtr, u16 Direction)
 Exits parking mode, the channel will return to circular buffer mode. More...
 
void XAxiVdma_StartFrmCntEnable (XAxiVdma *InstancePtr, u16 Direction)
 Starts frame count enable on one channel. More...
 
void XAxiVdma_IntrEnable (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
 Enables specific interrupts for a channel. More...
 
void XAxiVdma_IntrDisable (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
 Disables specific interrupts for a channel. More...
 
u32 XAxiVdma_IntrGetPending (XAxiVdma *InstancePtr, u16 Direction)
 Gets the pending interrupts of a channel. More...
 
void XAxiVdma_IntrClear (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
 Clears the pending interrupts specified by the bit mask. More...
 
int XAxiVdma_SetBdAddrs (XAxiVdma *InstancePtr, u32 BdAddrPhys, u32 BdAddrVirt, int NumBds, u16 Direction)
 Sets BD addresses to be different. More...
 
XAxiVdma_Channel * XAxiVdma_GetChannel (XAxiVdma *InstancePtr, u16 Direction)
 Gets a channel. More...
 
int XAxiVdma_SetFrmStore (XAxiVdma *InstancePtr, u8 FrmStoreNum, u16 Direction)
 Sets the number of frame store buffers to use. More...
 
void XAxiVdma_GetFrmStore (XAxiVdma *InstancePtr, u8 *FrmStoreNum, u16 Direction)
 Gets the number of frame store buffers to use. More...
 
int XAxiVdma_FsyncSrcSelect (XAxiVdma *InstancePtr, u32 Source, u16 Direction)
 Configures Frame Sync Source and valid only when C_USE_FSYNC is enabled. More...
 
int XAxiVdma_GenLockSourceSelect (XAxiVdma *InstancePtr, u32 Source, u16 Direction)
 Configures Gen Lock Source. More...
 
int XAxiVdma_GetDmaChannelErrors (XAxiVdma *InstancePtr, u16 Direction)
 Checks for DMA Channel Errors. More...
 
int XAxiVdma_ClearDmaChannelErrors (XAxiVdma *InstancePtr, u16 Direction, u32 ErrorMask)
 Clears DMA Channel Errors. More...
 
int XAxiVdma_MaskS2MMErrIntr (XAxiVdma *InstancePtr, u32 ErrorMask, u16 Direction)
 Masks the S2MM error interrupt for the provided error mask value. More...
 
int XAxiVdma_StartWriteFrame (XAxiVdma *InstancePtr, XAxiVdma_DmaSetup *DmaConfigPtr)
 Starts a write operation. More...
 
int XAxiVdma_StartReadFrame (XAxiVdma *InstancePtr, XAxiVdma_DmaSetup *DmaConfigPtr)
 Starts a read operation. More...
 
int XAxiVdma_DmaConfig (XAxiVdma *InstancePtr, u16 Direction, XAxiVdma_DmaSetup *DmaConfigPtr)
 Configures one DMA channel using the configuration structure. More...
 
int XAxiVdma_DmaSetBufferAddr (XAxiVdma *InstancePtr, u16 Direction, UINTPTR *BufferAddrSet)
 Configures buffer addresses for one DMA channel. More...
 
int XAxiVdma_DmaStart (XAxiVdma *InstancePtr, u16 Direction)
 Starts one DMA channel. More...
 
void XAxiVdma_DmaStop (XAxiVdma *InstancePtr, u16 Direction)
 Stops one DMA channel. More...
 
void XAxiVdma_DmaRegisterDump (XAxiVdma *InstancePtr, u16 Direction)
 Dumps registers of one DMA channel. More...
 
int XAxiVdma_SetFrameCounter (XAxiVdma *InstancePtr, XAxiVdma_FrameCounter *CfgPtr)
 Sets the frame counter and delay counter for both channels. More...
 
void XAxiVdma_GetFrameCounter (XAxiVdma *InstancePtr, XAxiVdma_FrameCounter *CfgPtr)
 Gets the frame counter and delay counter for both channels. More...
 
void XAxiVdma_ReadIntrHandler (void *InstancePtr)
 Interrupts handler for the read channel. More...
 
void XAxiVdma_WriteIntrHandler (void *InstancePtr)
 Interrupts handler for the write channel. More...
 
int XAxiVdma_SetCallBack (XAxiVdma *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef, u16 Direction)
 Sets call back function and call back reference pointer for one channel. More...
 
int XAxiVdma_Selftest (XAxiVdma *InstancePtr)
 Runs a self-test on the driver/device. More...
 

Macro Definition Documentation

#define XAXIVDMA_H_   /* by using protection macros */

Include guard for the AXI VDMA driver header.