General purpose DMA management. More...
|
Data Structures | |
| struct | hal_dma_desc_tag |
| General purpose DMA descriptor definition. More... | |
| struct | hal_dma_env_tag |
| Environment structure definition. More... | |
Defines | |
| #define | DMA_LLICTRL(index) |
| Configure the bridge DMA control field. | |
| #define | HAL_DMA_POOL (RW_BFMER_EN) |
| Indicate if a pool of GP DMA Descriptors have to be allocated. | |
| #define | HAL_DMA_DESC_POOL_SIZE (10) |
| Number of descriptors in pool of General Purpose DMA descriptors. | |
Typedefs | |
| typedef void(* | cb_dma_func_ptr )(void *, int) |
| Pointer to callback function. | |
Enumerations | |
| enum | { DMA_DL, DMA_UL, DMA_MAX } |
General purpose DMA direction. More... | |
Functions | |
| void | hal_dma_init (void) |
| Initialize the general purpose DMA module. | |
| void | hal_dma_push (struct hal_dma_desc_tag *desc, int type) |
| Push a DMA request. | |
| void | hal_dma_evt (int dma_queue) |
| Handler for the general purpose DMA event. | |
| void | hal_dma_dl_irq (void) |
| Interrupt handler for the general purpose DMA download interrupt. | |
| void | hal_dma_ul_irq (void) |
| Interrupt handler for the general purpose DMA upload interrupt. | |
| struct hal_dma_desc_tag * | hal_dma_get_desc (void) |
| Return a struct hal_dma_desc_tag object extracted from the pool of descriptors. | |
| void | hal_dma_release_desc (struct hal_dma_desc_tag *gp_dma_desc) |
| Add back a GP DMA descriptor to the pool of descriptors. | |
Variables | |
| const uint8_t | dma2chan [DMA_MAX] |
| Array of conversion between the DMA transfer type and the DMA channel that is used. | |
| const uint8_t | dma2lli [DMA_MAX] |
| Array of conversion between the DMA transfer type and the DMA LLI that is used. | |
| struct hal_dma_env_tag | hal_dma_env |
| HAL DMA environment variable. | |
| struct hal_dma_env_tag | hal_dma_env |
| HAL DMA environment variable. | |
General purpose DMA management.
| #define DMA_LLICTRL | ( | index | ) |
(IPC_DMA_LLI_COUNTER_EN|(dma2lli[index]<<IPC_DMA_LLI_COUNTER_POS) \ | IPC_DMA_LLI_IRQ_EN|(dma2lli[index] << IPC_DMA_LLI_IRQ_POS))
Configure the bridge DMA control field.
| anonymous enum |
| void hal_dma_dl_irq | ( | void | ) |
Interrupt handler for the general purpose DMA download interrupt.
| void hal_dma_evt | ( | int | dma_queue | ) |
Handler for the general purpose DMA event.
| [in] | dma_queue | DMA queue index (DL or UL) |
| struct hal_dma_desc_tag* hal_dma_get_desc | ( | void | ) | [read] |
Return a struct hal_dma_desc_tag object extracted from the pool of descriptors.
If the descriptor is pushed, it will be automatically inserted back in the pool of descriptors upon confirmation of the DMA transfer. If the descriptor is not pushed and must be released, use hal_dma_release_desc function.
| void hal_dma_push | ( | struct hal_dma_desc_tag * | desc, | |
| int | type | |||
| ) |
Push a DMA request.
| [in] | desc | Pointer to the DMA descriptor to be used for the transfer |
| [in] | type | Type of transfer (i.e DMA_DL or DMA_UL) |
Referenced by mm_bcn_update(), and scanu_ie_download().
| void hal_dma_release_desc | ( | struct hal_dma_desc_tag * | gp_dma_desc | ) |
Add back a GP DMA descriptor to the pool of descriptors.
| [in] | gp_dma_desc | Descriptor to be released |
| void hal_dma_ul_irq | ( | void | ) |
Interrupt handler for the general purpose DMA upload interrupt.
| const uint8_t dma2chan[DMA_MAX] |
{
[DMA_DL] = IPC_DMA_CHANNEL_CTRL_TX,
[DMA_UL] = IPC_DMA_CHANNEL_CTRL_RX,
}
Array of conversion between the DMA transfer type and the DMA channel that is used.
| const uint8_t dma2lli[DMA_MAX] |
{
[DMA_DL] = IPC_DMA_LLI_GP_DL,
[DMA_UL] = IPC_DMA_LLI_GP_UL,
}
Array of conversion between the DMA transfer type and the DMA LLI that is used.
1.6.1