12 #ifndef __CI100X_DMAC_H 13 #define __CI100X_DMAC_H 24 #define GDMA_SDRAM_ADDR (0x70000000UL) 25 #define GDMA_SDRAM_SIZE (16*1024*1024) 27 #define GDMA_CSRAM_ADDR (0x1FFF8000UL) 28 #define GDMA_CSRAM_SIZE (32*1024) 30 #define GDMA_SRAM0_ADDR (0x1FFE8000UL) 31 #define GDMA_SRAM0_SIZE (64*1024) 33 #define GDMA_SRAM1_ADDR (0x20000000UL) 34 #define GDMA_SRAM1_SIZE (64*1024) 36 #define GDMA_PCMRAM_ADDR (0x20020000UL) 37 #define GDMA_PCMRAM_SIZE (16*1024) 39 #define GDMA_FFTRAM_ADDR (0x200FF800UL) 40 #define GDMA_FFTRAM_SIZE (2*1024) 239 #endif //#if SPIC_DMA_MODEFI 291 DMAC_FLOWCTRL flowctrl,
unsigned int srcaddr,
unsigned int destaddr,\
295 unsigned int srcaddr,
unsigned int destaddr,
unsigned int bytesize);
299 void spic_dma_transfer_config(uint32_t srcaddr, uint32_t destaddr, uint32_t transfersize);
INCREMENTx SrcInc
Definition: ci130x_dma.h:206
Definition: ci130x_dma.h:189
int DMAC_IntErrorStatus(DMACChannelx dmachannel)
DMA通道传输错误中断状态
Definition: ci130x_dma.c:225
Definition: ci130x_dma.h:110
void DMAC_M2P_P2MConfig(DMACChannelx dmachannel, DMAC_Peripherals periph, DMAC_FLOWCTRL flowctrl, unsigned int srcaddr, unsigned int destaddr, unsigned int bytesize)
DMA通道传输 内存到外设,外设到内存
Definition: ci130x_dma.c:727
int wait_dma_translate_flag(DMACChannelx dmachannel, uint32_t timeout)
等待dma中断标志
Definition: ci130x_dma.c:60
Definition: ci130x_dma.h:55
void clear_dma_translate_flag(DMACChannelx dmachannel)
清除dma中断标志
Definition: ci130x_dma.c:45
Definition: ci130x_dma.h:137
void DMAC_M2P_P2M_advance_config(DMACChannelx dmachannel, DMAC_Peripherals periph, DMAC_FLOWCTRL flowctrl, unsigned int srcaddr, unsigned int destaddr, unsigned int bytesize, TRANSFERWIDTHx datawidth, BURSTSIZEx burstsize, DMAC_AHBMasterx master)
DMA通道传输 内存到外设,外设到内存
Definition: ci130x_dma.c:664
Definition: ci130x_dma.h:168
uint32_t destaddr
Definition: ci130x_dma.h:236
void DMAC_ChannelDestConfig(DMACChannelx dmachannel, INCREMENTx inc, DMAC_AHBMasterx dmamaster, TRANSFERWIDTHx transferwidth, BURSTSIZEx brustsize)
DMA通道目标的相关配置
Definition: ci130x_dma.c:416
void DMAC_ChannelPowerDown(DMACChannelx dmachannel, FunctionalState cmd)
DMA通道传输Power控制
Definition: ci130x_dma.c:590
Definition: ci130x_dma.h:79
DMAC_AHBMasterx SrcMaster
Definition: ci130x_dma.h:208
Definition: ci130x_dma.h:127
void DMAC_ChannelTransferSize(DMACChannelx dmachannel, unsigned short size)
DMA通道传输大小配置
Definition: ci130x_dma.c:464
void(* dma_callback_func_ptr_t)(void)
dma完成回调函数指针
Definition: ci130x_dma.h:245
DMAC_ACCESS_MODE
DMA的访问模式选择
Definition: ci130x_dma.h:125
BURSTSIZEx DestBurstSize
Definition: ci130x_dma.h:211
unsigned short TransferSize
Definition: ci130x_dma.h:213
Definition: ci130x_dma.h:114
TRANSFERWIDTHx transferwidth
Definition: ci130x_dma.h:234
Definition: ci130x_dma.h:173
Definition: ci130x_dma.h:190
Definition: ci130x_dma.h:108
uint32_t transfersize
Definition: ci130x_dma.h:237
Definition: ci130x_dma.h:188
BURSTSIZEx
DMA 突发传输大小选择
Definition: ci130x_dma.h:105
void DMAC_ChannelDestAddr(DMACChannelx dmachannel, unsigned int addr)
DMA通道目标地址配置
Definition: ci130x_dma.c:373
void dma_irq_handler(void)
DMA中断处理函数
Definition: ci130x_dma.c:171
void DMAC_SoftwareLastBurstReq(DMACChannelx dmachannel)
DMA通道软件最后一次突发传输请求
Definition: ci130x_dma.c:305
Definition: ci130x_dma.h:187
BUFFERABLEx BufferAble
Definition: ci130x_dma.h:203
Definition: ci130x_dma.h:54
Definition: ci130x_dma.h:71
Definition: ci130x_dma.h:113
Definition: ci130x_dma.h:107
Definition: ci130x_dma.h:157
void DMAC_ChannelLLIControl(DMACChannelx dmachannel, unsigned int val)
DMA配置控制寄存器
Definition: ci130x_dma.c:780
Definition: ci130x_dma.h:147
DMAC_FLOWCTRL
DMA的传输方向选择
Definition: ci130x_dma.h:165
Definition: ci130x_dma.h:191
TRANSFERWIDTHx
DMA 数据宽度选择
Definition: ci130x_dma.h:95
Definition: ci130x_dma.h:88
void spic_dma_config(DMACChannelx channel, dma_config_t *config)
配置FLASH的DMA传输
Definition: ci130x_dma.c:1048
Definition: ci130x_dma.h:183
void DMAC_ChannelSourceConfig(DMACChannelx dmachannel, INCREMENTx inc, DMAC_AHBMasterx dmamaster, TRANSFERWIDTHx transferwidth, BURSTSIZEx brustsize)
DMA通道源的相关配置
Definition: ci130x_dma.c:398
void DMAC_ChannelHalt(DMACChannelx dmachannel, FunctionalState cmd)
DMA通道传输(中停)Halt
Definition: ci130x_dma.c:572
Definition: ci130x_dma.h:148
void DMAC_ChannelInterruptMask(DMACChannelx dmachannel, CHANNELINTMASKx channelintmask, FunctionalState cmd)
DMA通道中断屏蔽配置
Definition: ci130x_dma.c:521
Definition: ci130x_dma.h:158
void DMAC_ChannelProtectionConfig(DMACChannelx dmachannel, DMAC_ACCESS_MODE access_mode, BUFFERABLEx bufferable, CACHEABLEx cacheable)
DMA通道保护位的设置
Definition: ci130x_dma.c:451
unsigned int DMAC_ChannelCurrentTransferSize(DMACChannelx dmachannel)
当前DMA通道,还剩余多少数据尚未传输,以字节为单位
Definition: ci130x_dma.c:482
Definition: ci130x_dma.h:62
uint32_t srcaddr
Definition: ci130x_dma.h:235
FLASH的DMA传输配置结构体
Definition: ci130x_dma.h:230
void DMAC_EN(FunctionalState cmd)
DMA控制器使能
Definition: ci130x_dma.c:337
void DMAC_ChannelLLI(DMACChannelx dmachannel, unsigned int dmalli, DMAC_AHBMasterx dmamaster)
DMA通道 LLI 配置
Definition: ci130x_dma.c:384
CACHEABLEx
DMA的cache缓冲配置选择
Definition: ci130x_dma.h:145
void DMAC_ChannelEnable(DMACChannelx dmachannel)
DMA通道传输使能
Definition: ci130x_dma.c:508
BURSTSIZEx busrtsize
Definition: ci130x_dma.h:233
Definition: ci130x_dma.h:98
DMAC_ACCESS_MODE AccessMode
Definition: ci130x_dma.h:204
Definition: ci130x_dma.h:80
DMAC_AHBMasterx DestMaster
Definition: ci130x_dma.h:207
void DMAC_Config(DMAC_AHBMasterx dmamaster, ENDIANMODE endianmode)
DMA控制器AHB MASTER 字节端序的配置
Definition: ci130x_dma.c:326
void DMAC_ChannelDisable(DMACChannelx dmachannel)
DMA通道传输禁止
Definition: ci130x_dma.c:495
void DMAC_IntErrorClear(DMACChannelx dmachannel)
清除DMA通道传输错误中断状态
Definition: ci130x_dma.c:235
void dma_without_os_int(void)
使用全局变量设置中断触发状态,并清除中断
Definition: ci130x_dma.c:84
Definition: ci130x_dma.h:128
DMAC_AHBMasterx
DMA master选择
Definition: ci130x_dma.h:68
void DMAC_ChannelTCInt(DMACChannelx dmachannel, FunctionalState cmd)
DMA通道传输完成中断使能配置
Definition: ci130x_dma.c:431
DMACChannelx
DMA 通道选择
Definition: ci130x_dma.h:52
DMA的链表传输配置结构体
Definition: ci130x_dma.h:199
void DMAC_IntTCClear(DMACChannelx dmachannel)
清除DMA通道传输完成中断状态
Definition: ci130x_dma.c:207
Definition: ci130x_dma.h:169
INCREMENTx DestInc
Definition: ci130x_dma.h:205
Definition: ci130x_dma.h:192
INCREMENTx
DMA 地址递增选择
Definition: ci130x_dma.h:86
Definition: ci130x_dma.h:99
Definition: ci130x_dma.h:70
DMAC_FLOWCTRL flowctrl
Definition: ci130x_dma.h:232
Definition: ci130x_dma.h:89
BUFFERABLEx
DMA的缓冲配置选择
Definition: ci130x_dma.h:135
void DMAC_ChannelConfig(DMACChannelx dmachannel, char destperiph, char srcperiph, DMAC_FLOWCTRL flowctrl)
DMA通道其他相关配置
Definition: ci130x_dma.c:541
int DMAC_IntStatus(DMACChannelx dmachannel)
DMA通道屏蔽后的中断状态(只要有通道传输完成中断或者通道传输错误中断的一个)
Definition: ci130x_dma.c:186
void DMAC_SoftwareSingleReq(DMACChannelx dmachannel)
DMA通道软件单次传输请求
Definition: ci130x_dma.c:295
Definition: ci130x_dma.h:172
void DMAC_ChannelSoureAddr(DMACChannelx dmachannel, unsigned int addr)
DMA通道源地址配置
Definition: ci130x_dma.c:362
Definition: ci130x_dma.h:109
FunctionalState TCInt
Definition: ci130x_dma.h:201
int DMAC_RawIntTCStatus(DMACChannelx dmachannel)
DMA通道原始的(屏蔽前)中断状态(只要有通道传输完成中断或者通道传输错误中断的一个)
Definition: ci130x_dma.c:253
FunctionalState
Definition: ci130x_system.h:86
CHANNELINTMASKx
DMA的中断选择
Definition: ci130x_dma.h:155
ENDIANMODE
DMA 数据大小端选择
Definition: ci130x_dma.h:77
Definition: ci130x_dma.h:167
TRANSFERWIDTHx SrcTransferWidth
Definition: ci130x_dma.h:210
DMAC_Peripherals
DMA的外设选择
Definition: ci130x_dma.h:181
TRANSFERWIDTHx DestTransferWidth
Definition: ci130x_dma.h:209
void DMAC_ChannelLock(DMACChannelx dmachannel, FunctionalState cmd)
DMA通道传输锁
Definition: ci130x_dma.c:554
Definition: ci130x_dma.h:138
int DMAC_IntTCStatus(DMACChannelx dmachannel)
DMA通道传输完成中断状态
Definition: ci130x_dma.c:197
BURSTSIZEx SrcBurstSize
Definition: ci130x_dma.h:212
int DMAC_RawErrorIntStatus(DMACChannelx dmachannel)
DMA通道传输错误原始(屏蔽前)中断状态
Definition: ci130x_dma.c:264
unsigned int DMAC_LLIContrlreturn(LLI_Control *lli_ctrl)
DMA 链表配置结构体初始化
Definition: ci130x_dma.c:827
void DMAC_SoftwareLastSingleReq(DMACChannelx dmachannel)
DMA通道软件最后一次单次传输请求
Definition: ci130x_dma.c:315
void DMAC_SoftwareBurstReq(DMACChannelx dmachannel)
DMA通道软件突发传输请求
Definition: ci130x_dma.c:285
Definition: ci130x_dma.h:112
void DMAC_M2MConfig(DMACChannelx dmachannel, unsigned int srcaddr, unsigned int destaddr, unsigned int bytesize, DMAC_AHBMasterx master)
DMA通道传输 内存到内存
Definition: ci130x_dma.c:612
Definition: ci130x_dma.h:97
int DMAC_ChannelEnableStatus(DMACChannelx dmachannel)
DMA通道使能状态
Definition: ci130x_dma.c:275
Definition: ci130x_dma.h:111
CACHEABLEx CacheAble
Definition: ci130x_dma.h:202