# /space/home/slher/rel/Beken/v6_4_5/macsw/plf/refip/src/driver/dma/dma.h File Reference

DMA utility functions. More...

`#include "co_int.h"`
`#include "rwnx_config.h"`
`#include "co_math.h"`
`#include "compiler.h"`
`#include "reg_dma.h"`

Go to the source code of this file.

## Data Structures
struct | dma_desc
| Element in the pool of TX DMA bridge descriptors. More...
struct | dma_env_tag
| Structure describing the DMA driver environment. More...
## Defines
#define | IPC_DMA_LLI_TX_MASK 0x001F
| Mask of the DMA LLI IRQs status bits that are assigned for TX.
#define | IPC_DMA_LLI_CFM_MASK 0x0100
| Mask of the DMA LLI IRQs status bits that are assigned for CFM.
#define | IPC_DMA_LLI_RX_MASK 0x0020
| Mask of the DMA LLI IRQs status bits that are assigned for RX.
#define | IPC_DMA_LLI_COUNTER_EN 0x0010
| Indicate that an LLI counter must be incremented at the end of the LLI process.
#define | IPC_DMA_LLI_COUNTER_MASK 0x000F
| Mask of the LLI counter index to increment at the end of the LLI process.
#define | IPC_DMA_LLI_COUNTER_POS 0
| Bit position of the LLI counter index.
#define | IPC_DMA_LLI_IRQ_EN 0x1000
| Indicate that an IRQ must be generated at the end of the LLI process.
#define | IPC_DMA_LLI_IRQ_MASK 0x0F00
| Mask of the LLI IRQ index to generate at the end of the LLI process.
#define | IPC_DMA_LLI_IRQ_POS 8
| Bit position of the LLI IRQ index.
## Enumerations
enum | { IPC_DMA_CHANNEL_CTRL_RX, IPC_DMA_CHANNEL_DATA_RX, IPC_DMA_CHANNEL_CTRL_TX, IPC_DMA_CHANNEL_DATA_TX, IPC_DMA_CHANNEL_INTERNAL, IPC_DMA_CHANNEL_MAX }
| DMA channel indexes. More...
enum | { IPC_DMA_LLI_DATA_AC0_TX, IPC_DMA_LLI_DATA_AC1_TX, IPC_DMA_LLI_DATA_AC2_TX, IPC_DMA_LLI_DATA_AC3_TX, IPC_DMA_LLI_DATA_BCN_TX, IPC_DMA_LLI_DATA_RX0, IPC_DMA_LLI_MSG, IPC_DMA_LLI_DBG, IPC_DMA_LLI_CFM_TX, IPC_DMA_LLI_GP_DL, IPC_DMA_LLI_DBG_DUMP, IPC_DMA_LLI_GP_UL, IPC_DMA_LLI_MAX }
| DMA LLI assignment. More...
## Functions
void | dma_init (void)
| Initialize the bridge DMA registers.
void | dma_push (struct dma_desc *first, struct dma_desc *last, int channel_idx)
| Chains a chained list of descriptors in the DMA.
void | dma_buserr_isr (void)
| Interrupt service routine when a bus error is detected while in a DMA transfer.
__INLINE void | dma_lli_disable (int lli)
| Disable an LLI IRQ.
__INLINE void | dma_lli_enable (int lli)
| Enable an LLI IRQ.
__INLINE void | dma_lli_poll (int lli)
| Poll for an LLI IRQ.
## Variables
struct dma_env_tag | dma_env
| DMA environment structure.

## Detailed Description

DMA utility functions.

Copyright (C) RivieraWaves 2011-2019

Definition in file dma.h.