9 #ifndef _HARDWARE_STRUCTS_DMA_H
10 #define _HARDWARE_STRUCTS_DMA_H
13 #include "hardware/regs/dma.h"
24 _REG_(DMA_CH0_READ_ADDR_OFFSET)
28 _REG_(DMA_CH0_WRITE_ADDR_OFFSET)
32 _REG_(DMA_CH0_TRANS_COUNT_OFFSET)
34 io_rw_32 transfer_count;
36 _REG_(DMA_CH0_CTRL_TRIG_OFFSET)
56 _REG_(DMA_CH0_AL1_CTRL_OFFSET)
60 _REG_(DMA_CH0_AL1_READ_ADDR_OFFSET)
62 io_rw_32 al1_read_addr;
64 _REG_(DMA_CH0_AL1_WRITE_ADDR_OFFSET)
66 io_rw_32 al1_write_addr;
68 _REG_(DMA_CH0_AL1_TRANS_COUNT_TRIG_OFFSET)
70 io_rw_32 al1_transfer_count_trig;
72 _REG_(DMA_CH0_AL2_CTRL_OFFSET)
76 _REG_(DMA_CH0_AL2_TRANS_COUNT_OFFSET)
78 io_rw_32 al2_transfer_count;
80 _REG_(DMA_CH0_AL2_READ_ADDR_OFFSET)
82 io_rw_32 al2_read_addr;
84 _REG_(DMA_CH0_AL2_WRITE_ADDR_TRIG_OFFSET)
86 io_rw_32 al2_write_addr_trig;
88 _REG_(DMA_CH0_AL3_CTRL_OFFSET)
92 _REG_(DMA_CH0_AL3_WRITE_ADDR_OFFSET)
94 io_rw_32 al3_write_addr;
96 _REG_(DMA_CH0_AL3_TRANS_COUNT_OFFSET)
98 io_rw_32 al3_transfer_count;
100 _REG_(DMA_CH0_AL3_READ_ADDR_TRIG_OFFSET)
102 io_rw_32 al3_read_addr_trig;
110 _REG_(DMA_INTR_OFFSET)
115 _REG_(DMA_INTE0_OFFSET)
120 _REG_(DMA_INTF0_OFFSET)
125 _REG_(DMA_INTS0_OFFSET)
132 _REG_(DMA_INTE1_OFFSET)
137 _REG_(DMA_INTF1_OFFSET)
142 _REG_(DMA_INTS1_OFFSET)
147 _REG_(DMA_TIMER0_OFFSET)
153 io_rw_32 timer[NUM_DMA_TIMERS];
155 _REG_(DMA_MULTI_CHAN_TRIGGER_OFFSET)
158 io_rw_32 multi_channel_trigger;
160 _REG_(DMA_SNIFF_CTRL_OFFSET)
170 _REG_(DMA_SNIFF_DATA_OFFSET)
176 _REG_(DMA_FIFO_LEVELS_OFFSET)
181 io_ro_32 fifo_levels;
183 _REG_(DMA_CHAN_ABORT_OFFSET)
194 } ch[NUM_DMA_CHANNELS];
197 #define dma_hw ((dma_hw_t *)DMA_BASE)
198 #define dma_debug_hw ((dma_debug_hw_t *)(DMA_BASE + DMA_CH0_DBG_CTDREQ_OFFSET))
200 static_assert( NUM_DMA_TIMERS == 4,
"");
201 static_assert( NUM_DMA_CHANNELS == 12,
"");