#include <cfg/arch.h>#include <arch/cm3.h>#include <dev/irqreg.h>#include <arch/cm3/cortex_interrupt.h>#include <arch/cm3/stm/stm32_dma.h>Functions | |
| void | DMA_Setup (uint8_t ch, void *dst, void *src, uint16_t length, uint32_t flags) |
| void | DMA_Enable (uint8_t ch) |
| void | DMA_Disable (uint8_t ch) |
| void | DMA_Init (void) |
| DMA System Initialization. | |
| void | DMA_IrqMask (uint8_t ch, uint32_t mask, uint8_t ena) |
| Control DMA channel interrupt masks. | |
| void | DMA_ClearFlag (uint8_t ch, uint32_t flags) |
| Clear DMA channel flags. | |
| uint32_t | DMA_GetFlag (uint8_t ch) |
| Get DMA channel flags. | |
Variables | |
| const DMATAB | DmaTab [] |
| Table to align channels and interrupts for simpler access. | |
| const uint8_t | DMACount = sizeof(DmaTab)/sizeof(DMATAB) |
| const DMATAB * | DmaTab1 = &DmaTab[0] |
| void DMA_Enable | ( | uint8_t | ch | ) |
References DMA_Channel_TypeDef::CCR, and DMA_CCR1_EN.
| void DMA_Disable | ( | uint8_t | ch | ) |
References DMA_Channel_TypeDef::CCR, and DMA_CCR1_EN.
| void DMA_Init | ( | void | ) |
DMA System Initialization.
Register all DMA interrupt handlers.
References DMA_Channel_TypeDef::CCR, DMA1, DMA2, DMA_ClearFlag(), RCC, RCC_AHBENR_DMA1EN, RCC_AHBENR_DMA2EN, and STM_HAS_DMA1.
Control DMA channel interrupt masks.
Setup interrupt mask on given channel. Channel numbers are from 0..n while documentation numbers them from 1..n. For that please use the defines DMAx_Cn.
| ch | Channel number to set interrupt mask. |
| mask | Mask to set on the designated channel interrupts. |
| ena | Enable (1) or Disable (0) the bits in the mask. |
References DMA_Channel_TypeDef::CCR, DMA_FLAGMASK, DMATAB::fofs, and DMA_TypeDef::IFCR.
Clear DMA channel flags.
Setup interrupt mask on given channel. Channel numbers are from 0..n while documentation numbers them from 1..n. For that please use the defines DMAx_Cn.
| ch | Channel number. |
| flags | Mask of flags to clear. |
References DMA_FLAGMASK, and DMA_TypeDef::IFCR.
Get DMA channel flags.
Get interrupt / status flags of given channel.
| ch | Channel number to set interrupt mask. |
References DMA_FLAGMASK, DMATAB::fofs, and DMA_TypeDef::ISR.
{
{ DMA1_BASE, 0, DMA1_Channel1 },
{ DMA1_BASE, 4, DMA1_Channel2 },
{ DMA1_BASE, 8, DMA1_Channel3 },
{ DMA1_BASE, 12, DMA1_Channel4 },
{ DMA1_BASE, 16, DMA1_Channel5 },
{ DMA1_BASE, 20, DMA1_Channel6 },
{ DMA1_BASE, 24, DMA1_Channel7 },
}
Table to align channels and interrupts for simpler access.