RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Functions | Variables

Functions

bool XDMAD_UpdateStatusFromCallback (sXdmad *pXdmad, uint32_t Channel, uint32_t status)
 
void XDMAD_DoNothingCallback (uint32_t Channel, void *pArg, uint32_t status)
 
 RTEMS_SYSINIT_ITEM (XDMAD_SysInitialize, RTEMS_SYSINIT_BSP_START, RTEMS_SYSINIT_ORDER_LAST_BUT_5)
 
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_SetCallback (sXdmad *pXdmad, uint32_t dwChannel, XdmadTransferCallback fCallback, void *pArg)
 Set the callback function for xDMA channel 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_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_StartTransfer (sXdmad *pXdmad, uint32_t dwChannel)
 Start xDMA transfer.
 
eXdmadRC XDMAD_StopTransfer (sXdmad *pXdmad, uint32_t dwChannel)
 Stop DMA transfer.
 
eXdmadRC XDMAD_IsTransferDone (sXdmad *pXdmad, uint32_t dwChannel)
 

Variables

sXdmad XDMAD_Instance
 

Detailed Description

Function Documentation

◆ XDMAD_AllocateChannel()

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

Allocate a XDMA channel for upper layer.

Parameters
pXdmadPointer to xDMA driver instance.
bSrcIDSource peripheral ID, 0xFF for memory.
bDstIDDestination peripheral ID, 0xFF for memory.
Returns
Channel number if allocation successful, return XDMAD_ALLOC_FAILED if allocation failed.

◆ XDMAD_ConfigureTransfer()

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
pXdmadPointer to xDMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.

◆ XDMAD_FreeChannel()

eXdmadRC XDMAD_FreeChannel ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Free the specified xDMA channel.

Parameters
pXdmadPointer to xDMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.

◆ XDMAD_PrepareChannel()

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
pXdmadPointer to xDMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.
dwCfgConfiguration value.

◆ XDMAD_SetCallback()

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

Set the callback function for xDMA channel transfer.

Parameters
pXdmadPointer to xDMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.
fCallbackPointer to callback function.
pArgPointer to optional argument for callback.

◆ XDMAD_StartTransfer()

eXdmadRC XDMAD_StartTransfer ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Start xDMA transfer.

Parameters
pXdmadPointer to XDMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.

◆ XDMAD_StopTransfer()

eXdmadRC XDMAD_StopTransfer ( sXdmad pXdmad,
uint32_t  dwChannel 
)

Stop DMA transfer.

Parameters
pDmadPointer to DMA driver instance.
dwChannelControllerNumber << 8 | ChannelNumber.