SAMV71 Xplained Ultra Software Package 1.5

DMA Driver Functions
[XDMA Drivers]

Collaboration diagram for DMA Driver Functions:

Functions

void XDMAD_Initialize (sXdmad *pXdmad, uint8_t bPollingMode)
 Initialize xDMA driver instance.
void XDMAD_Handler (sXdmad *pDmad)
 xDMA interrupt handler
uint32_t XDMAD_AllocateChannel (sXdmad *pXdmad, uint8_t bSrcID, uint8_t bDstID)
 Allocate a XDMA channel for upper layer.
eXdmadRC XDMAD_FreeChannel (sXdmad *pXdmad, uint32_t dwChannel)
 Free the specified xDMA channel.
eXdmadRC XDMAD_ConfigureTransfer (sXdmad *pXdmad, uint32_t dwChannel, sXdmadCfg *pXdmaParam, uint32_t dwXdmaDescCfg, uint32_t dwXdmaDescAddr, uint32_t dwXdmaIntEn)
 Configure DMA for a single transfer.
eXdmadRC XDMAD_PrepareChannel (sXdmad *pXdmad, uint32_t dwChannel)
 Enable clock of the xDMA peripheral, Enable the dma peripheral, configure configuration register for xDMA transfer.
eXdmadRC XDMAD_IsTransferDone (sXdmad *pXdmad, uint32_t dwChannel)
 Check if DMA transfer is finished. In polling mode XDMAD_Handler() is polled.
eXdmadRC XDMAD_StartTransfer (sXdmad *pXdmad, uint32_t dwChannel)
 Start xDMA transfer.
eXdmadRC XDMAD_SetCallback (sXdmad *pXdmad, uint32_t dwChannel, XdmadTransferCallback fCallback, void *pArg)
 Set the callback function for xDMA channel transfer.
eXdmadRC XDMAD_StopTransfer (sXdmad *pXdmad, uint32_t dwChannel)
 Stop DMA transfer.

Function Documentation

uint32_t XDMAD_AllocateChannel ( sXdmad pXdmad,
uint8_t  bSrcID,
uint8_t  bDstID 
)

Allocate a XDMA channel for upper layer.

Parameters:
pXdmad Pointer to xDMA driver instance.
bSrcID Source peripheral ID, 0xFF for memory.
bDstID Destination peripheral ID, 0xFF for memory.
Returns:
Channel number if allocation successful, return XDMAD_ALLOC_FAILED if allocation failed.

Definition at line 184 of file xdmad.c.

eXdmadRC XDMAD_ConfigureTransfer ( sXdmad pXdmad,
uint32_t  dwChannel,
sXdmadCfg pXdmaParam,
uint32_t  dwXdmaDescCfg,
uint32_t  dwXdmaDescAddr,
uint32_t  dwXdmaIntEn 
)

Configure DMA for a single transfer.

Parameters:
pXdmad Pointer to xDMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.

Definition at line 413 of file xdmad.c.

Here is the call graph for this function:

eXdmadRC XDMAD_FreeChannel ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Free the specified xDMA channel.

Parameters:
pXdmad Pointer to xDMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.

Definition at line 203 of file xdmad.c.

void XDMAD_Handler ( sXdmad pDmad  ) 

xDMA interrupt handler

Parameters:
pxDmad Pointer to DMA driver instance.

Definition at line 304 of file xdmad.c.

Here is the call graph for this function:

void XDMAD_Initialize ( sXdmad pXdmad,
uint8_t  bPollingMode 
)

Initialize xDMA driver instance.

Parameters:
pXdmad Pointer to xDMA driver instance.
bPollingMode Polling DMA transfer: 1. Via XDMAD_IsTransferDone(); or 2. Via XDMAD_Handler().

Definition at line 140 of file xdmad.c.

Here is the call graph for this function:

eXdmadRC XDMAD_IsTransferDone ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Check if DMA transfer is finished. In polling mode XDMAD_Handler() is polled.

Parameters:
pDmad Pointer to DMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.

Definition at line 384 of file xdmad.c.

Here is the call graph for this function:

eXdmadRC XDMAD_PrepareChannel ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Enable clock of the xDMA peripheral, Enable the dma peripheral, configure configuration register for xDMA transfer.

Parameters:
pXdmad Pointer to xDMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.
dwCfg Configuration value.

Definition at line 263 of file xdmad.c.

Here is the call graph for this function:

eXdmadRC XDMAD_SetCallback ( sXdmad pXdmad,
uint32_t  dwChannel,
XdmadTransferCallback  fCallback,
void *  pArg 
)

Set the callback function for xDMA channel transfer.

Parameters:
pXdmad Pointer to xDMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.
fCallback Pointer to callback function.
pArg Pointer to optional argument for callback.

Definition at line 233 of file xdmad.c.

eXdmadRC XDMAD_StartTransfer ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Start xDMA transfer.

Parameters:
pXdmad Pointer to XDMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.

Definition at line 474 of file xdmad.c.

Here is the call graph for this function:

eXdmadRC XDMAD_StopTransfer ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Stop DMA transfer.

Parameters:
pDmad Pointer to DMA driver instance.
dwChannel ControllerNumber << 8 | ChannelNumber.

Definition at line 508 of file xdmad.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines