DMA Driver.
More...
|
enum | ADI_DMA_INCR_TYPE {
ADI_DMA_INCR_1_BYTE = 0x00u,
ADI_DMA_INCR_2_BYTE = 0x01u,
ADI_DMA_INCR_4_BYTE = 0x02u,
ADI_DMA_INCR_NONE = 0x03u,
ADI_DMA_DECR_1_BYTE = 0x10u,
ADI_DMA_DECR_2_BYTE = 0x11u,
ADI_DMA_DECR_4_BYTE = 0x12u
} |
|
enum | ADI_DMA_EVENT {
ADI_DMA_EVENT_BUFFER_PROCESSED,
ADI_DMA_EVENT_ERR_BUS,
ADI_DMA_EVENT_ERR_INVALID_DESCRIPTOR
} |
|
enum | ADI_DMA_WIDTH_TYPE {
ADI_DMA_WIDTH_1_BYTE = 0x0,
ADI_DMA_WIDTH_2_BYTE = 0x1,
ADI_DMA_WIDTH_4_BYTE = 0x2
} |
|
enum | ADI_DMA_RPOWER {
ADI_DMA_RPOWER_1 = 0,
ADI_DMA_RPOWER_2,
ADI_DMA_RPOWER_4,
ADI_DMA_RPOWER_8,
ADI_DMA_RPOWER_16,
ADI_DMA_RPOWER_32,
ADI_DMA_RPOWER_64,
ADI_DMA_RPOWER_128,
ADI_DMA_RPOWER_256,
ADI_DMA_RPOWER_512,
ADI_DMA_RPOWER_1024
} |
|
enum | ADI_DMA_MODE {
ADI_DMA_MODE_BASIC,
ADI_DMA_MODE_AUTO,
ADI_DMA_MODE_PING_PONG,
ADI_DMA_MODE_MSG,
ADI_DMA_MODE_PSG
} |
|
enum | ADI_DMA_PRIORITY {
ADI_DMA_PRIORITY_DEFAULT = 0,
ADI_DMA_PRIORITY_HIGH
} |
|
enum | ADI_DMA_RESULT {
ADI_DMA_SUCCESS,
ADI_DMA_ERR_NOT_INITIALIZED,
ADI_DMA_ERR_INVALID_PARAMETER
} |
|
DMA Driver.
This driver is intended to be used only by the device drivers and not by the application.
- Note
- The device drivers must include drivers/dma/adi_dma.h to use this driver
uDMA Device Driver.
◆ ADI_DMA_INCR_TYPE
Amount of memory(In bytes) required by the DMA manager for managing the operation This memory is completely owned by the driver till the end of the operation.
Dma Data Increments
Enumerator |
---|
ADI_DMA_INCR_1_BYTE | Byte increment
|
ADI_DMA_INCR_2_BYTE | Half word increment
|
ADI_DMA_INCR_4_BYTE | Word increment
|
ADI_DMA_INCR_NONE | No increment
|
ADI_DMA_DECR_1_BYTE | Byte decrement
|
ADI_DMA_DECR_2_BYTE | Half word decrement
|
ADI_DMA_DECR_4_BYTE | Word decrement
|
Definition at line 74 of file adi_dma.h.
◆ ADI_DMA_EVENT
DMA Callback Events
Enumerator |
---|
ADI_DMA_EVENT_BUFFER_PROCESSED | Buffer processed event
|
ADI_DMA_EVENT_ERR_BUS | Bus Error Occurred Event
|
ADI_DMA_EVENT_ERR_INVALID_DESCRIPTOR | Invalid Descriptor Event
|
Definition at line 90 of file adi_dma.h.
◆ ADI_DMA_WIDTH_TYPE
Dma Data Widths
Enumerator |
---|
ADI_DMA_WIDTH_1_BYTE | 8-bit
|
ADI_DMA_WIDTH_2_BYTE | 16-bit
|
ADI_DMA_WIDTH_4_BYTE | 32-bit
|
Definition at line 101 of file adi_dma.h.
◆ ADI_DMA_RPOWER
Dma Rearbitration Intervals (chunk size between bus arbitrations)
Enumerator |
---|
ADI_DMA_RPOWER_1 | Rearbitrate after 1 transfer
|
ADI_DMA_RPOWER_2 | Rearbitrate after 2 transfers
|
ADI_DMA_RPOWER_4 | Rearbitrate after 4 transfers
|
ADI_DMA_RPOWER_8 | Rearbitrate after 8 transfers
|
ADI_DMA_RPOWER_16 | Rearbitrate after 16 transfers
|
ADI_DMA_RPOWER_32 | Rearbitrate after 32 transfers
|
ADI_DMA_RPOWER_64 | Rearbitrate after 64 transfers
|
ADI_DMA_RPOWER_128 | Rearbitrate after 128 transfers
|
ADI_DMA_RPOWER_256 | Rearbitrate after 256 transfers
|
ADI_DMA_RPOWER_512 | Rearbitrate after 512 transfers
|
ADI_DMA_RPOWER_1024 | Rearbitrate after 1024 transfers
|
Definition at line 112 of file adi_dma.h.
◆ ADI_DMA_MODE
Dma Transfer Modes
Enumerator |
---|
ADI_DMA_MODE_BASIC | Basic mode
|
ADI_DMA_MODE_AUTO | Auto request mode
|
ADI_DMA_MODE_PING_PONG | Ping pong mode
|
ADI_DMA_MODE_MSG | Memory Scatter gather mode (not valid as no Memory DMA support)
|
ADI_DMA_MODE_PSG | Peripheral Scatter mode
|
Definition at line 131 of file adi_dma.h.
◆ ADI_DMA_PRIORITY
Dma Channel Priority Settings (only HIGH or DEFAULT priority supported)
Enumerator |
---|
ADI_DMA_PRIORITY_DEFAULT | Use DEFAULT channel priority
|
ADI_DMA_PRIORITY_HIGH | Elevate channel to HIGH priority
|
Definition at line 144 of file adi_dma.h.
◆ ADI_DMA_RESULT
Result Event Type
Enumerator |
---|
ADI_DMA_SUCCESS | Successfully Completed
|
ADI_DMA_ERR_NOT_INITIALIZED | DMA not initialized
|
ADI_DMA_ERR_INVALID_PARAMETER | Input parameter to the function is invalid
|
Definition at line 154 of file adi_dma.h.
◆ adi_dma_Init()
void adi_dma_Init |
( |
void |
| ) |
|
◆ adi_dma_RegisterCallback()
ADI_DMA_RESULT adi_dma_RegisterCallback |
( |
DMA_CHANn_TypeDef const |
eChannelID, |
|
|
ADI_CALLBACK const |
pfCallback, |
|
|
void *const |
pCBParam |
|
) |
| |
Register a call-back function for a DMA channel.
- Parameters
-
[in] | eChannelID | The ID of the DMA channel being assigned a call-back function. |
[in] | pfCallback | Pointer to the application callback function. |
[in] | pCBParam | Application callback parameter. |
The function registers a call-back function for the DMA channel node identified by eChannelID and stores the extra parameters this call-back function may require. A NULL callback function pointer means "DMA channel unused".
- Returns
- Status
Definition at line 223 of file adi_dma.c.
Referenced by adi_crc_Close(), adi_crc_Open(), adi_crypto_Open(), adi_fee_Open(), adi_spi_Open(), adi_sport_Close(), and adi_sport_Open().