Software Drivers

xaxivdma.h File Reference

#include "xaxivdma_hw.h"
#include "xaxivdma_i.h"
#include "xstatus.h"
#include "xil_assert.h"

Classes

struct  XAxiVdma_Config
struct  XAxiVdma_DmaSetup
struct  XAxiVdma_FrameCounter
struct  XAxiVdma_ChannelCallBack
struct  XAxiVdma

Defines

#define XAXIVDMA_H_
#define XAXIVDMA_WRITE   1
#define XAXIVDMA_READ   2
#define XAXIVDMA_CHAN_FSYNC   0
#define XAXIVDMA_CHAN_OTHER_FSYNC   1
#define XAXIVDMA_S2MM_TUSER_FSYNC   2
#define XAXIVDMA_EXTERNAL_GENLOCK   0
#define XAXIVDMA_INTERNAL_GENLOCK   1
#define XAXIVDMA_GENLOCK_MASTER   0
#define XAXIVDMA_GENLOCK_SLAVE   1
#define XAXIVDMA_DYN_GENLOCK_MASTER   2
#define XAXIVDMA_DYN_GENLOCK_SLAVE   3
#define XAXIVDMA_HANDLER_GENERAL   1
#define XAXIVDMA_HANDLER_ERROR   2
#define XAXIVDMA_DEVICE_READY   0x11111111
#define XAXIVDMA_ENABLE_DBG_THRESHOLD_REG   0x01
#define XAXIVDMA_ENABLE_DBG_FRMSTORE_REG   0x02
#define XAXIVDMA_ENABLE_DBG_FRM_CNTR   0x04
#define XAXIVDMA_ENABLE_DBG_DLY_CNTR   0x08
#define XAXIVDMA_ENABLE_DBG_ALL_FEATURES   0x0F
#define XST_VDMA_MISMATCH_ERROR   1430

Typedefs

typedef void(* XAxiVdma_CallBack )(void *CallBackRef, u32 InterruptTypes)
typedef void(* XAxiVdma_ErrorCallBack )(void *CallBackRef, u32 ErrorMask)

Functions

XAxiVdma_ConfigXAxiVdma_LookupConfig (u16 DeviceId)
int XAxiVdma_CfgInitialize (XAxiVdma *InstancePtr, XAxiVdma_Config *CfgPtr, u32 EffectiveAddr)
void XAxiVdma_Reset (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_ResetNotDone (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_IsBusy (XAxiVdma *InstancePtr, u16 Direction)
u32 XAxiVdma_CurrFrameStore (XAxiVdma *InstancePtr, u16 Direction)
u32 XAxiVdma_GetVersion (XAxiVdma *InstancePtr)
u32 XAxiVdma_GetStatus (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_SetLineBufThreshold (XAxiVdma *InstancePtr, int LineBufThreshold, u16 Direction)
int XAxiVdma_StartParking (XAxiVdma *InstancePtr, int FrameIndex, u16 Direction)
void XAxiVdma_StopParking (XAxiVdma *InstancePtr, u16 Direction)
void XAxiVdma_StartFrmCntEnable (XAxiVdma *InstancePtr, u16 Direction)
void XAxiVdma_IntrEnable (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
void XAxiVdma_IntrDisable (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
u32 XAxiVdma_IntrGetPending (XAxiVdma *InstancePtr, u16 Direction)
void XAxiVdma_IntrClear (XAxiVdma *InstancePtr, u32 IntrType, u16 Direction)
int XAxiVdma_SetBdAddrs (XAxiVdma *InstancePtr, u32 BdAddrPhys, u32 BdAddrVirt, int NumBds, u16 Direction)
XAxiVdma_ChannelXAxiVdma_GetChannel (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_SetFrmStore (XAxiVdma *InstancePtr, u8 FrmStoreNum, u16 Direction)
void XAxiVdma_GetFrmStore (XAxiVdma *InstancePtr, u8 *FrmStoreNum, u16 Direction)
int XAxiVdma_FsyncSrcSelect (XAxiVdma *InstancePtr, u32 Source, u16 Direction)
int XAxiVdma_GenLockSourceSelect (XAxiVdma *InstancePtr, u32 Source, u16 Direction)
int XAxiVdma_GetDmaChannelErrors (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_ClearDmaChannelErrors (XAxiVdma *InstancePtr, u16 Direction, u32 ErrorMask)
int XAxiVdma_MaskS2MMErrIntr (XAxiVdma *InstancePtr, u32 ErrorMask, u16 Direction)
int XAxiVdma_StartWriteFrame (XAxiVdma *InstancePtr, XAxiVdma_DmaSetup *DmaConfigPtr)
int XAxiVdma_StartReadFrame (XAxiVdma *InstancePtr, XAxiVdma_DmaSetup *DmaConfigPtr)
int XAxiVdma_DmaConfig (XAxiVdma *InstancePtr, u16 Direction, XAxiVdma_DmaSetup *DmaConfigPtr)
int XAxiVdma_DmaSetBufferAddr (XAxiVdma *InstancePtr, u16 Direction, u32 *BufferAddrSet)
int XAxiVdma_DmaStart (XAxiVdma *InstancePtr, u16 Direction)
void XAxiVdma_DmaStop (XAxiVdma *InstancePtr, u16 Direction)
void XAxiVdma_DmaRegisterDump (XAxiVdma *InstancePtr, u16 Direction)
int XAxiVdma_SetFrameCounter (XAxiVdma *InstancePtr, XAxiVdma_FrameCounter *FrameCounterCfgPtr)
void XAxiVdma_GetFrameCounter (XAxiVdma *InstancePtr, XAxiVdma_FrameCounter *FrameCounterCfgPtr)
void XAxiVdma_ReadIntrHandler (void *InstancePtr)
void XAxiVdma_WriteIntrHandler (void *InstancePtr)
int XAxiVdma_SetCallBack (XAxiVdma *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef, u16 Direction)

Detailed Description


Define Documentation

#define XAXIVDMA_CHAN_FSYNC   0

Frame Sync Source Selection

#define XAXIVDMA_CHAN_OTHER_FSYNC   1
#define XAXIVDMA_DEVICE_READY   0x11111111

Flag to signal that device is ready to be used

#define XAXIVDMA_DYN_GENLOCK_MASTER   2
#define XAXIVDMA_DYN_GENLOCK_SLAVE   3
#define XAXIVDMA_ENABLE_DBG_ALL_FEATURES   0x0F
#define XAXIVDMA_ENABLE_DBG_DLY_CNTR   0x08
#define XAXIVDMA_ENABLE_DBG_FRM_CNTR   0x04
#define XAXIVDMA_ENABLE_DBG_FRMSTORE_REG   0x02
#define XAXIVDMA_ENABLE_DBG_THRESHOLD_REG   0x01

Debug Configuration Parameter Constants (C_ENABLE_DEBUG_INFO_*)

#define XAXIVDMA_EXTERNAL_GENLOCK   0

GenLock Source Selection

#define XAXIVDMA_GENLOCK_MASTER   0

GenLock Mode Constants

#define XAXIVDMA_GENLOCK_SLAVE   1
#define XAXIVDMA_H_
#define XAXIVDMA_HANDLER_ERROR   2

Error Interrupt Type

#define XAXIVDMA_HANDLER_GENERAL   1

Interrupt type for setting up callback Non-Error Interrupt Type

#define XAXIVDMA_INTERNAL_GENLOCK   1
#define XAXIVDMA_READ   2

DMA transfer from memory

#define XAXIVDMA_S2MM_TUSER_FSYNC   2
#define XAXIVDMA_WRITE   1

VDMA data transfer direction DMA transfer into memory

#define XST_VDMA_MISMATCH_ERROR   1430

Typedef Documentation

typedef void(* XAxiVdma_CallBack)(void *CallBackRef, u32 InterruptTypes)

Callback type for general interrupts

Parameters:
CallBackRef is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is called.
InterruptTypes indicates the detailed type(s) of the interrupt. Its value equals 'OR'ing one or more XAXIVDMA_IXR_* values defined in xaxivdma_hw.h
typedef void(* XAxiVdma_ErrorCallBack)(void *CallBackRef, u32 ErrorMask)

Callback type for Error interrupt.

Parameters:
CallBackRef is a callback reference passed in by the upper layer when setting the callback function, and it is passed back to the upper layer when the callback is called.
ErrorMask is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XAXIVDMA_IXR_* values defined in xaxivdma_hw.h

Function Documentation

int XAxiVdma_CfgInitialize ( XAxiVdma InstancePtr,
XAxiVdma_Config CfgPtr,
u32  EffectiveAddr 
)

Initialize the driver with hardware configuration

Parameters:
InstancePtr is the pointer to the DMA engine to work on
CfgPtr is the pointer to the hardware configuration structure
EffectiveAddr is the virtual address map for the device
Returns:
  • XST_SUCCESS if everything goes fine
  • XST_FAILURE if reset the hardware failed, need system reset to recover
Note:
If channel fails reset, then it will be set as invalid
int XAxiVdma_ClearDmaChannelErrors ( XAxiVdma InstancePtr,
u16  Direction,
u32  ErrorMask 
)

Clear DMA Channel Errors.

Parameters:
InstancePtr is the XAxiVdma instance to operate on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
ErrorMask is the mask of error bits to clear
Returns:
- XST_SUCCESS, when error bits are cleared.
  • XST_INVALID_PARAM, when channel pointer is invalid.
  • XST_DEVICE_NOT_FOUND, when the channel is not valid.
Note:
None
u32 XAxiVdma_CurrFrameStore ( XAxiVdma InstancePtr,
u16  Direction 
)

Get the current frame that hardware is working on

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
The current frame that the hardware is working on
Note:
If returned frame number is out of range, then the channel is invalid
int XAxiVdma_DmaConfig ( XAxiVdma InstancePtr,
u16  Direction,
XAxiVdma_DmaSetup DmaConfigPtr 
)

Configure one DMA channel using the configuration structure

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel to work on
DmaConfigPtr is the pointer to the setup structure
Returns:
  • XST_SUCCESS if successful
  • XST_DEVICE_BUSY if the DMA channel is not idle, BDs are still being used
  • XST_INVAID_PARAM if buffer address not valid, for example, unaligned address with no DRE built in the hardware, or Direction invalid
  • XST_DEVICE_NOT_FOUND if the channel is invalid
void XAxiVdma_DmaRegisterDump ( XAxiVdma InstancePtr,
u16  Direction 
)

Dump registers of one DMA channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel to work on
Returns:
None
Note:
If channel is invalid, then do nothing on that channel
int XAxiVdma_DmaSetBufferAddr ( XAxiVdma InstancePtr,
u16  Direction,
u32 *  BufferAddrSet 
)

Configure buffer addresses for one DMA channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel to work on
BufferAddrSet is the set of addresses for the transfers
Returns:
  • XST_SUCCESS if successful
  • XST_DEVICE_BUSY if the DMA channel is not idle, BDs are still being used
  • XST_INVAID_PARAM if buffer address not valid, for example, unaligned address with no DRE built in the hardware, or Direction invalid
  • XST_DEVICE_NOT_FOUND if the channel is invalid
int XAxiVdma_DmaStart ( XAxiVdma InstancePtr,
u16  Direction 
)

Start one DMA channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel to work on
Returns:
  • XST_SUCCESS if channel started successfully
  • XST_FAILURE otherwise
  • XST_DEVICE_NOT_FOUND if the channel is invalid
  • XST_INVALID_PARAM if Direction invalid
void XAxiVdma_DmaStop ( XAxiVdma InstancePtr,
u16  Direction 
)

Stop one DMA channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel to work on
Returns:
None
Note:
If channel is invalid, then do nothing on that channel
int XAxiVdma_FsyncSrcSelect ( XAxiVdma InstancePtr,
u32  Source,
u16  Direction 
)

Configure Frame Sync Source and valid only when C_USE_FSYNC is enabled.

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Source is the value to set the source of Frame Sync
Direction is the DMA channel to work on
Returns:
  • XST_SUCCESS if successful
  • XST_FAILURE if C_USE_FSYNC is disabled.
int XAxiVdma_GenLockSourceSelect ( XAxiVdma InstancePtr,
u32  Source,
u16  Direction 
)

Configure Gen Lock Source

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Source is the value to set the source of Gen Lock
Direction is the DMA channel to work on
Returns:
  • XST_SUCCESS if successful
  • XST_FAILURE if the channel is in GenLock Master Mode. if C_INCLUDE_INTERNAL_GENLOCK is disabled.
XAxiVdma_Channel* XAxiVdma_GetChannel ( XAxiVdma InstancePtr,
u16  Direction 
)

Get a channel

Parameters:
InstancePtr is the DMA engine to work on
Direction is the direction for the channel to get
Returns:
The pointer to the channel. Upon error, return NULL.
Note:
Since this function is internally used, we assume Direction is valid
int XAxiVdma_GetDmaChannelErrors ( XAxiVdma InstancePtr,
u16  Direction 
)

Check for DMA Channel Errors.

Parameters:
InstancePtr is the XAxiVdma instance to operate on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
- Errors seen on the channel
  • XST_INVALID_PARAM, when channel pointer is invalid.
  • XST_DEVICE_NOT_FOUND, when the channel is not valid.
Note:
None
void XAxiVdma_GetFrameCounter ( XAxiVdma InstancePtr,
XAxiVdma_FrameCounter CfgPtr 
)

Get the frame counter and delay counter for both channels

Parameters:
InstancePtr is the pointer to the DMA engine to work on
CfgPtr is the configuration structure to contain return values
Returns:
None
Note:
If returned frame counter value is 0, then the channel is not valid
void XAxiVdma_GetFrmStore ( XAxiVdma InstancePtr,
u8 *  FrmStoreNum,
u16  Direction 
)

Get the number of frame store buffers to use.

Parameters:
InstancePtr is the XAxiVdma instance to operate on
FrmStoreNum is the number of frame store buffers to use.
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
None
Note:
None
u32 XAxiVdma_GetStatus ( XAxiVdma InstancePtr,
u16  Direction 
)

Get the status of a channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
The status of the channel
Note:
An invalid return value indicates that channel is invalid
u32 XAxiVdma_GetVersion ( XAxiVdma InstancePtr  ) 

Get the version of the hardware

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Returns:
The version of the hardware
void XAxiVdma_IntrClear ( XAxiVdma InstancePtr,
u32  IntrType,
u16  Direction 
)

Clear the pending interrupts specified by the bit mask

Interrupts not specified by the mask will not be affected

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel, use XAXIVDMA_READ or XAXIVDMA_WRITE
IntrType is the bit mask for the interrups to be cleared
Returns:
None
Note:
If channel is invalid, then nothing is done
void XAxiVdma_IntrDisable ( XAxiVdma InstancePtr,
u32  IntrType,
u16  Direction 
)

Disable specific interrupts for a channel

Interrupts not specified by the mask will not be affected

Parameters:
InstancePtr is the pointer to the DMA engine to work on
IntrType is the bit mask for the interrups to be disabled
Direction is the DMA channel, use XAXIVDMA_READ or XAXIVDMA_WRITE
Returns:
None
Note:
If channel is invalid, then nothing is done
void XAxiVdma_IntrEnable ( XAxiVdma InstancePtr,
u32  IntrType,
u16  Direction 
)

Enable specific interrupts for a channel

Interrupts not specified by the mask will not be affected

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel, use XAXIVDMA_READ or XAXIVDMA_WRITE
IntrType is the bit mask for the interrups to be enabled
Returns:
None
Note:
If channel is invalid, then nothing is done
u32 XAxiVdma_IntrGetPending ( XAxiVdma InstancePtr,
u16  Direction 
)

Get the pending interrupts of a channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the DMA channel, use XAXIVDMA_READ or XAXIVDMA_WRITE
Returns:
The bit mask for the currently pending interrupts
Note:
If Direction is invalid, return 0
int XAxiVdma_IsBusy ( XAxiVdma InstancePtr,
u16  Direction 
)

Check whether a DMA channel is busy

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
  • Non-zero if the channel is busy
  • Zero if the channel is idle
XAxiVdma_Config* XAxiVdma_LookupConfig ( u16  DeviceId  ) 

Look up the hardware configuration for a device instance

Parameters:
DeviceId is the unique device ID of the device to lookup for
Returns:
The configuration structure for the device. If the device ID is not found, a NULL pointer is returned.
int XAxiVdma_MaskS2MMErrIntr ( XAxiVdma InstancePtr,
u32  ErrorMask,
u16  Direction 
)

Masks the S2MM error interrupt for the provided error mask value

Parameters:
InstancePtr is the XAxiVdma instance to operate on
ErrorMask is the mask of error bits for which S2MM error interrupt can be disabled.
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
- XST_SUCCESS, when error bits are cleared.
  • XST_INVALID_PARAM, when channel pointer is invalid.
  • XST_DEVICE_NOT_FOUND, when the channel is not valid.
Note:
The register S2MM_DMA_IRQ_MASK is only applicable from IPv6.01a which is added at offset XAXIVDMA_S2MM_DMA_IRQ_MASK_OFFSET. For older versions, this offset location is reserved and so the API does not have any effect.
void XAxiVdma_ReadIntrHandler ( void *  InstancePtr  ) 

Interrupt handler for the read channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Returns:
None
Note:
If the channel is invalid, then no interrupt handling
void XAxiVdma_Reset ( XAxiVdma InstancePtr,
u16  Direction 
)

This function resets one DMA channel

The registers will be default values after the reset

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
None
Note:
Due to undeterminism of system delays, check the reset status through XAxiVdma_ResetNotDone(). If direction is invalid, do nothing.
int XAxiVdma_ResetNotDone ( XAxiVdma InstancePtr,
u16  Direction 
)

This function checks one DMA channel for reset completion

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
  • 0 if reset is done
  • 1 if reset is ongoing
Note:
We do not check for channel validity, because channel is marked as invalid before reset is done
int XAxiVdma_SetBdAddrs ( XAxiVdma InstancePtr,
u32  BdAddrPhys,
u32  BdAddrVirt,
int  NumBds,
u16  Direction 
)

Set BD addresses to be different.

In some systems, it is convenient to put BDs into a certain region of the memory. This function enables that.

Parameters:
InstancePtr is the pointer to the DMA engine to work on
BdAddrPhys is the physical starting address for BDs
BdAddrVirt is the Virtual starting address for BDs. For systems that do not use MMU, then virtual address is the same as physical address
NumBds is the number of BDs to setup with. This is required to be the same as the number of frame stores for that channel
Direction is the channel direction
Returns:
  • XST_SUCCESS for a successful setup
  • XST_DEVICE_BUSY if the DMA channel is not idle, BDs are still being used
  • XST_INVALID_PARAM if parameters not valid
  • XST_DEVICE_NOT_FOUND if the channel is invalid

We assume that the memory region starting from BdAddrPhys and BdAddrVirt are large enough to hold all the BDs.

int XAxiVdma_SetCallBack ( XAxiVdma InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef,
u16  Direction 
)

Set call back function and call back reference pointer for one channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
HandlerType is the interrupt type that this callback handles
CallBackFunc is the call back function pointer
CallBackRef is the call back reference pointer
Direction is the DMA channel, use XAXIVDMA_READ or XAXIVDMA_WRITE
Returns:
  • XST_SUCCESS if everything is fine
  • XST_INVALID_PARAM if the handler type or direction invalid
Note:
This function overwrites the existing interrupt handler and its reference pointer. The function sets the handlers even if the channels are invalid.
int XAxiVdma_SetFrameCounter ( XAxiVdma InstancePtr,
XAxiVdma_FrameCounter CfgPtr 
)

Set the frame counter and delay counter for both channels

Parameters:
InstancePtr is the pointer to the DMA engine to work on
CfgPtr is the pointer to the configuration structure
Returns:
  • XST_SUCCESS if setup finishes successfully
  • XST_INVALID_PARAM if the configuration structure has invalid values
  • Others if setting channel frame counter fails
Note:
If channel is invalid, then do nothing on that channel
int XAxiVdma_SetFrmStore ( XAxiVdma InstancePtr,
u8  FrmStoreNum,
u16  Direction 
)

Set the number of frame store buffers to use.

Parameters:
InstancePtr is the XAxiVdma instance to operate on
FrmStoreNum is the number of frame store buffers to use.
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
- XST_SUCCESS if operation is successful
  • XST_FAILURE if operation fails.
  • XST_NO_FEATURE if access to FrameStore register is disabled
Note:
None
int XAxiVdma_SetLineBufThreshold ( XAxiVdma InstancePtr,
int  LineBufThreshold,
u16  Direction 
)

Configure Line Buffer Threshold

Parameters:
InstancePtr is the pointer to the DMA engine to work on
LineBufThreshold is the value to set threshold
Direction is the DMA channel to work on
Returns:
  • XST_SUCCESS if successful
  • XST_FAILURE otherwise
  • XST_NO_FEATURE if access to Threshold register is disabled
void XAxiVdma_StartFrmCntEnable ( XAxiVdma InstancePtr,
u16  Direction 
)

Start frame count enable on one channel

This is needed to start limiting the number of frames to transfer so that software can check the data etc after hardware stops transfer.

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
None
int XAxiVdma_StartParking ( XAxiVdma InstancePtr,
int  FrameIndex,
u16  Direction 
)

Start parking mode on a certain frame

Parameters:
InstancePtr is the pointer to the DMA engine to work on
FrameIndex is the frame to park on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
  • XST_SUCCESS if everything is fine
  • XST_INVALID_PARAM if . channel is invalid . FrameIndex is invalid . Direction is invalid
int XAxiVdma_StartReadFrame ( XAxiVdma InstancePtr,
XAxiVdma_DmaSetup DmaConfigPtr 
)

Start a read operation

Read corresponds to send data from memory to device

Parameters:
InstancePtr is the pointer to the DMA engine to work on
DmaConfigPtr is the pointer to the setup structure
Returns:
  • XST_SUCCESS for a successful submission
  • XST_DEVICE_BUSY if the DMA channel is not idle, BDs are still being used
  • XST_INVAID_PARAM if parameters in config structure not valid
  • XST_DEVICE_NOT_FOUND if the channel is invalid
int XAxiVdma_StartWriteFrame ( XAxiVdma InstancePtr,
XAxiVdma_DmaSetup DmaConfigPtr 
)

Start a write operation

Write corresponds to send data from device to memory

Parameters:
InstancePtr is the pointer to the DMA engine to work on
DmaConfigPtr is the pointer to the setup structure
Returns:
  • XST_SUCCESS for a successful submission
  • XST_DEVICE_BUSY if the DMA channel is not idle, BDs are still being used
  • XST_INVAID_PARAM if parameters in config structure not valid
  • XST_DEVICE_NOT_FOUND if the channel is invalid
void XAxiVdma_StopParking ( XAxiVdma InstancePtr,
u16  Direction 
)

Exit parking mode, the channel will return to circular buffer mode

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Direction is the channel to work on, use XAXIVDMA_READ/WRITE
Returns:
None
Note:
If channel is invalid, then do nothing
void XAxiVdma_WriteIntrHandler ( void *  InstancePtr  ) 

Interrupt handler for the write channel

Parameters:
InstancePtr is the pointer to the DMA engine to work on
Returns:
None
Note:
If the channel is invalid, then no interrupt handling