RTEMS: DMA Driver Functions

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions | Variables
DMA Driver Functions
Board Support Packages » ARM » Atmel/Microchip SAM E70, S70, V70 and V71 » Contributed Code

## 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

  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.

## ◆ 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

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

## ◆ XDMAD_FreeChannel()

eXdmadRC XDMAD_FreeChannel | ( | sXdmad * | pXdmad,
|  | uint32_t | dwChannel
| ) |  |

Free the specified xDMA channel.

Parameters

  pXdmad | Pointer to xDMA driver instance.
  dwChannel | ControllerNumber << 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

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

## ◆ XDMAD_SetCallback()

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.

## ◆ XDMAD_StartTransfer()

eXdmadRC XDMAD_StartTransfer | ( | sXdmad * | pXdmad,
|  | uint32_t | dwChannel
| ) |  |

Start xDMA transfer.

Parameters

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

## ◆ XDMAD_StopTransfer()

eXdmadRC XDMAD_StopTransfer | ( | sXdmad * | pXdmad,
|  | uint32_t | dwChannel
| ) |  |

Stop DMA transfer.

Parameters

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