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.

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.
[in]callbackfunction 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]argargument to pass to callback function
[out]channelreturns channel number of allocated DMA channel
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.

[in]channelDMA channel to free
result of API call