Api_hw_dma
Functions |
|
gos_result_t | gos_dma_alloc ( gos_handler_t callback, void *arg, gos_dma_channel_t *channel) |
Allocate a DMA channel.
More...
|
|
gos_result_t | gos_dma_free ( gos_dma_channel_t channel) |
Free a DMA channel.
More...
|
|
Detailed Description
Function Documentation
◆ gos_dma_alloc()
gos_result_t gos_dma_alloc | ( | gos_handler_t |
callback,
|
void * |
arg,
|
||
gos_dma_channel_t * |
channel
|
||
) |
Allocate a DMA channel.
Allocates a DMA channel from the kernel. The returned channel will be exclusively available to the user application.
- Note
- It is imperative to use this API to allocate channels which will be manually accessed by the application to prevent conflicts with the kernel's use of DMA.
- Parameters
-
[in] callback
function to be called when a DMA transfer on the channel returned by this function is complete. This function will execute in the IRQ context. [in] arg
argument to pass to callback function [out] channel
returns channel number of allocated DMA channel
- Returns
- result of API call
◆ gos_dma_free()
gos_result_t gos_dma_free | ( | gos_dma_channel_t |
channel
|
) |
Free a DMA channel.
Release a channel allocated by gos_dma_alloc.
- Parameters
-
[in] channel
DMA channel to free
- Returns
- result of API call