7.6.4.3 Function dma_allocate()
Allocate a DMA with configurations.
enum status_code dma_allocate( struct dma_resource * resource, struct dma_resource_config * config)
This function will allocate a proper channel for a DMA transfer request.
Data direction | Parameter name | Description |
---|---|---|
[in, out] |
dma_resource |
Pointer to a DMA resource instance |
[in] |
transfer_config |
Configurations of the DMA transfer |
Returns
Status of the allocation procedure.
Return value | Description |
---|---|
STATUS_OK |
The DMA resource was allocated successfully |
STATUS_ERR_NOT_FOUND |
DMA resource allocation failed |