Go to the documentation of this file.
75 #define DMA_ENABLE( inst ) \
76 do { reg_dma_rw_cfg e = REG_RD( dma, inst, rw_cfg );\
77 e.en = regk_dma_yes; \
78 REG_WR( dma, inst, rw_cfg, e); } while( 0 )
81 #define DMA_RESET( inst ) \
82 do { reg_dma_rw_cfg r = REG_RD( dma, inst, rw_cfg );\
84 REG_WR( dma, inst, rw_cfg, r); } while( 0 )
87 #define DMA_STOP( inst ) \
88 do { reg_dma_rw_cfg s = REG_RD( dma, inst, rw_cfg );\
89 s.stop = regk_dma_yes; \
90 REG_WR( dma, inst, rw_cfg, s); } while( 0 )
93 #define DMA_CONTINUE( inst ) \
94 do { reg_dma_rw_cfg c = REG_RD( dma, inst, rw_cfg );\
95 c.stop = regk_dma_no; \
96 REG_WR( dma, inst, rw_cfg, c); } while( 0 )
99 #define DMA_WR_CMD( inst, cmd_par ) \
100 do { reg_dma_rw_stream_cmd __x = {0}; \
101 do { __x = REG_RD(dma, inst, rw_stream_cmd); } while (__x.busy); \
102 __x.cmd = (cmd_par); \
103 REG_WR(dma, inst, rw_stream_cmd, __x); \
107 #define DMA_START_GROUP( inst, group_descr ) \
108 do { REG_WR_INT( dma, inst, rw_group, (int) group_descr ); \
109 DMA_WR_CMD( inst, regk_dma_load_g ); \
110 DMA_WR_CMD( inst, regk_dma_load_c ); \
111 DMA_WR_CMD( inst, regk_dma_load_d | regk_dma_burst ); \
115 #define DMA_START_CONTEXT( inst, ctx_descr ) \
116 do { REG_WR_INT( dma, inst, rw_group_down, (int) ctx_descr ); \
117 DMA_WR_CMD( inst, regk_dma_load_c ); \
118 DMA_WR_CMD( inst, regk_dma_load_d | regk_dma_burst ); \
122 #define DMA_CONTINUE_DATA( inst ) \
123 do { reg_dma_rw_cmd c = {0}; \
124 c.cont_data = regk_dma_yes;\
125 REG_WR( dma, inst, rw_cmd, c ); } while( 0 )