1.2.6 Direct Memory Access (DMA) System Service
The Direct Memory Access (DMA) controller is a bus master module that is useful for data transfers between different peripherals without intervention from the CPU. The source and destination of a DMA transfer can be any of the memory-mapped modules. For example, memory, or one of the Peripheral Bus (PBUS) devices such as the SPI, UART, and so on.
Library Interface
DMA System Service provides the following interfaces:
Functions
| Name | Description |
|---|---|
| SYS_DMA_ChannelCallbackRegister | This function allows a DMA client to set an event handler |
| SYS_DMA_ChannelTransfer | Adds a data transfer to a DMA channel and enables the channel to start data transfer |
| SYS_DMA_ChannelIsBusy | Returns the busy status of a specific DMA Channel |
| SYS_DMA_ChannelDisable | Disables the specified channel |
| SYS_DMA_AddressingModeSetup | Setup addressing mode of selected DMA channel |
| SYS_DMA_DataWidthSetup | Setup data width of selected DMA channel |
Data types and constants
| Name | Type | Description |
|---|---|---|
| SYS_DMA_CHANNEL | Enum | This lists the set of channels available for data transfer using DMA |
| SYS_DMA_TRANSFER_EVENT | Enum | Enumeration of possible DMA transfer events |
| SYS_DMA_SOURCE_ADDRESSING_MODE | Enum | Enumeration of possible DMA source addressing modes |
| SYS_DMA_DESTINATION_ADDRESSING_MODE | Enum | Enumeration of possible DMA destination addressing modes |
| SYS_DMA_WIDTH | Enum | Enumeration of possible DMA data width |
| SYS_DMA_CHANNEL_CALLBACK | Typedef | Pointer to a DMA Transfer Event handler function |
