20 struct process *dma_callback[DMA_CHANNEL_COUNT];
29 for(tmp_ptr = 0; tmp_ptr < DMA_CHANNEL_COUNT; tmp_ptr++) {
30 dma_callback[tmp_ptr] = 0;
34 tmp_ptr = (uint16_t)&(dma_conf[0]);
35 DMA0CFGH = tmp_ptr >> 8;
43 #if (DMA_CHANNEL_COUNT > 1)
44 tmp_ptr = (uint16_t)&(dma_conf[1]);
45 DMA1CFGH = tmp_ptr >> 8;
57 dma_associate_process(
struct process *p, uint8_t c)
59 if((!c) || (c >= DMA_CHANNEL_COUNT)) {
64 dma_conf[c].inc_prio |= 8;
78 static __xdata uint8_t dummy;
79 if(c >= DMA_CHANNEL_COUNT) {
83 dma_conf[c].src_h = (uint16_t)&dummy >> 8;
84 dma_conf[c].src_l = (uint16_t)&dummy;
85 dma_conf[c].dst_h = (uint16_t)&dummy >> 8;
86 dma_conf[c].dst_l = (uint16_t)&dummy;
87 dma_conf[c].len_h = 0;
88 dma_conf[c].len_l = 1;
89 dma_conf[c].wtt = DMA_BLOCK;
90 dma_conf[c].inc_prio = DMA_PRIO_ASSURED;
93 while(DMAARM & (1 << c));
Definitions for TI/Chipcon cc2530, cc2531 and cc2533 SFR registers.
DMA configuration structure.