EFM32 Pearl Gecko Software Documentation  efm32pg1-doc-4.2.1
dmactrl.c
Go to the documentation of this file.
1 /***************************************************************************/
19 #include "em_device.h"
20 #include "dmactrl.h"
21 
22 #if ( ( DMA_CHAN_COUNT > 0 ) && ( DMA_CHAN_COUNT <= 4 ) )
23 #define DMACTRL_CH_CNT 4
24 #define DMACTRL_ALIGNMENT 128
25 
26 #elif ( ( DMA_CHAN_COUNT > 4 ) && ( DMA_CHAN_COUNT <= 8 ) )
27 #define DMACTRL_CH_CNT 8
28 #define DMACTRL_ALIGNMENT 256
29 
30 #elif ( ( DMA_CHAN_COUNT > 8 ) && ( DMA_CHAN_COUNT <= 12 ) )
31 #define DMACTRL_CH_CNT 16
32 #define DMACTRL_ALIGNMENT 256
33 
34 #else
35 #error "Unsupported DMA channel count (dmactrl.c)."
36 #endif
37 
38 
40 #if defined (__ICCARM__)
41 #pragma data_alignment=DMACTRL_ALIGNMENT
42 DMA_DESCRIPTOR_TypeDef dmaControlBlock[DMACTRL_CH_CNT * 2];
43 
44 #elif defined (__CC_ARM)
45 DMA_DESCRIPTOR_TypeDef dmaControlBlock[DMACTRL_CH_CNT * 2] __attribute__ ((aligned(DMACTRL_ALIGNMENT)));
46 
47 #elif defined (__GNUC__)
48 DMA_DESCRIPTOR_TypeDef dmaControlBlock[DMACTRL_CH_CNT * 2] __attribute__ ((aligned(DMACTRL_ALIGNMENT)));
49 
50 #else
51 #error Undefined toolkit, need to define alignment
52 #endif
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
DMA_DESCRIPTOR_TypeDef dmaControlBlock[DMACTRL_CH_CNT *2]
Definition: dmactrl.c:48
DMA control data block.