CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
ci130x_iisdma.h
浏览该文件的文档.
1 
10 #ifndef __IISDMA_H
11 #define __IISDMA_H
12 
13 
14 #include "ci130x_system.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
32 typedef enum
33 {
39 
40 
45 typedef enum
46 {
62 
63 
68 typedef enum
69 {
76 }IISDMAChax;
77 
78 
83 typedef enum
84 {
97  /*...*/
103 
104 
109 typedef enum
110 {
117  /*...*/
131 
132 
137 typedef enum
138 {
151 
152  /*.........*/
156 
157 
158 
163 typedef enum
164 {
170 
171 
172 
173 //void IISDMA_DMICModeConfig(IISDMA_TypeDef* IISDMAx, FunctionalState cmd);
174 void IISDMA_ChannelENConfig(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, \
175  IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd);
177  IISDMA_TXRX_ENx iisdma_txrx_sel,FunctionalState cmd);
179  IISDMA_TXRX_ENx iisdma_txrx_sel,FunctionalState cmd);
180 void IISDMA_EN(IISDMA_TypeDef* IISDMAx, FunctionalState cmd);
181 void IISxDMA_RADDR(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, unsigned int rxaddr);
182 void IISxDMA_RNUM(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, IISDMA_RXxInterrupt iisrxtointerrupt ,\
183  IISDMA_RXTXxRollbackADDR rollbacktimes,IISDMA_TXRXSingleSIZEx rxsinglesize);
184 void IISxDMA_TADDR0(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, unsigned int txaddr0);
185 void IISxDMA_TNUM0(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr,\
186  IISDMA_TXRXSingleSIZEx txsinglesize);
187 void IISxDMA_TADDR1(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, unsigned int txaddr1);
188 void IISxDMA_TNUM1(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr,\
189  IISDMA_TXRXSingleSIZEx txsinglesize);
190 void IISDMA_PriorityConfig(IISDMA_TypeDef* IISDMAx, IISDMA_Priorityx iisdma_priority);
191 void IISDMA_INT_All_Clear(IISDMA_TypeDef* IISDMAx);
192 void IISDMA_INT_Clear(IISDMA_TypeDef* IISDMAx,unsigned int tmp);
193 int IISDMA_ADDRRollBackSTATE(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel);
197  IISDMA_TXADDR_Sel txrestart_addr);
198 void IISDMA_RXTXClear(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdmarxtx);
199 unsigned int IISxDMA_RXADDR(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx);
200 int IISDMA_TX_ADDR_Get(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx);
201 uint32_t Get_IISxDMA_RADDR(IISDMA_TypeDef* IISDMAx, IISDMAChax iisx);
202 //void i2s_dma_straight_to_vad(uint32_t,uint32_t block_times,uint32_t endroll_addr);
203 
208 typedef struct
209 {
211  uint32_t block_size;
212  /*---------------------------------*/
215  uint8_t iisdma_tx;
220  /*---------------------------------*/
223  uint8_t iisdma_rx;
227 
228 void iisdma_config(iisdma_config_p config);
229 
234 typedef struct
235 {
237  uint32_t addr;
238 }iis_data_t;
239 
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 #endif /*__IISDMA_H*/
246 /***************** (C) COPYRIGHT Chipintelli Technology Co., Ltd. *****END OF FILE****/
IIS0>IIS2>IIS1
Definition: ci130x_iisdma.h:50
void IISDMA_INT_Clear(IISDMA_TypeDef *IISDMAx, unsigned int tmp)
IISDMA单独清除某个通道的中断
Definition: ci130x_iisdma.c:297
IIS0>IIS1>IIS2
Definition: ci130x_iisdma.h:60
uint32_t iisdma_tx_block_num1
Definition: ci130x_iisdma.h:219
IISDMA_TXRXSingleSIZEx
IISDMA单次搬运的数据大小,16*x个byte,x为1~31
Definition: ci130x_iisdma.h:83
搬运32次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:121
搬运512次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:127
IISDMAChax TxChax
Definition: ci130x_iisdma.h:214
单次搬运80个byte的数据
Definition: ci130x_iisdma.h:94
Definition: ci130x_iisdma.h:234
void IISxDMA_RNUM(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXxInterrupt iisrxtointerrupt, IISDMA_RXTXxRollbackADDR rollbacktimes, IISDMA_TXRXSingleSIZEx rxsinglesize)
IISDMA接收数据长度配置
Definition: ci130x_iisdma.c:175
IIS1>IIS0>IIS2
Definition: ci130x_iisdma.h:52
uint32_t Get_IISxDMA_RADDR(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx)
返回当前IISDMA数据接收,存储的首地址
Definition: ci130x_iisdma.c:428
搬运40次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:123
搬运1次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:112
void IISxDMA_TNUM1(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr, IISDMA_TXRXSingleSIZEx txsinglesize)
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小
Definition: ci130x_iisdma.c:253
IISDMAChax cha
Definition: ci130x_iisdma.h:236
void IISxDMA_RADDR(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int rxaddr)
IISDMA接收地址配置
Definition: ci130x_iisdma.c:155
IISDMA_Priorityx
IISDMA中不同通道的优先级设置
Definition: ci130x_iisdma.h:45
void IISxDMA_TADDR1(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int txaddr1)
IISDMA TADDR1 发送地址寄存器配置
Definition: ci130x_iisdma.c:234
IISDMA_TXADDR_Sel
TADDR0或者TADDR1选择
Definition: ci130x_iisdma.h:163
通道2
Definition: ci130x_iisdma.h:75
单次搬运16个byte的数据
Definition: ci130x_iisdma.h:86
单次搬运64个byte的数据
Definition: ci130x_iisdma.h:92
uint32_t iisdma_rx_data_addr
Definition: ci130x_iisdma.h:224
TXADDR1
Definition: ci130x_iisdma.h:168
IISDMA_TXRXSingleSIZEx rx_single_size
Definition: ci130x_iisdma.h:221
void IISDMA_ChannelIntENConfig(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd)
IISDMA发送/接收通道数据传输完成一次中断使能
Definition: ci130x_iisdma.c:107
IIS2>IIS0>IIS1
Definition: ci130x_iisdma.h:56
IIS1>IIS2>IIS0
Definition: ci130x_iisdma.h:54
void iisdma_config(iisdma_config_p config)
IISDMA配置
Definition: ci130x_iisdma.c:474
int CHECK_IISDMA_DATABUSBUSY(IISDMA_TypeDef *IISDMAx)
IISDMA数据总线busy状态
Definition: ci130x_iisdma.c:326
搬运3次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:116
uint32_t iisdma_tx_data_addr1
Definition: ci130x_iisdma.h:218
单次搬运96个byte的数据
Definition: ci130x_iisdma.h:96
void IISxDMA_TXADDRRollbackInterruptClear(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXADDR_Sel txrestart_addr)
清除IISDMA发送内部的传输次数,并选择下一次传输开始的地址为TADDR0或者TADDR1
Definition: ci130x_iisdma.c:358
搬运32次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:154
通道1
Definition: ci130x_iisdma.h:73
IISDMA_RXxInterrupt
IISDMA传输多少次(x+1次,x为0~31)之后,若开启传输完成中断,来传输完成中断
Definition: ci130x_iisdma.h:137
struct iisdma_config_t * iisdma_config_p
int IISDMA_ADDRRollBackSTATE(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel)
IISDMA发送/接收传输通道完成一次地址切换的状态
Definition: ci130x_iisdma.c:312
void IISDMA_PriorityConfig(IISDMA_TypeDef *IISDMAx, IISDMA_Priorityx iisdma_priority)
IISDMA优先级设置
Definition: ci130x_iisdma.c:272
IISDMAChax
每个IISDMA对应的通道
Definition: ci130x_iisdma.h:68
IISDMA_TXRX_ENx
IISDMA TX或者RX选择
Definition: ci130x_iisdma.h:32
IIS0>IIS1>IIS2
Definition: ci130x_iisdma.h:48
使能IISDMA TX
Definition: ci130x_iisdma.h:35
uint32_t addr
Definition: ci130x_iisdma.h:237
搬运20次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:150
uint32_t iisdma_tx_block_num0
Definition: ci130x_iisdma.h:217
void IISxDMA_TNUM0(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr, IISDMA_TXRXSingleSIZEx txsinglesize)
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小
Definition: ci130x_iisdma.c:214
static volatile char tmp[32]
Definition: flash_manage_outside_port.c:144
单次搬运48个byte的数据
Definition: ci130x_iisdma.h:90
void IISDMA_RXCompleteClear(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx)
清除IISDMA接收通道完成传输的计数
Definition: ci130x_iisdma.c:339
搬运2次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:142
搬运8次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:146
TXADDR0
Definition: ci130x_iisdma.h:166
chip级定义
IIS2>IIS1>IIS0
Definition: ci130x_iisdma.h:58
void IISxDMA_TADDR0(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int txaddr0)
IISDMA TADDR0 发送地址寄存器配置
Definition: ci130x_iisdma.c:195
void IISDMA_ADDRRollBackINT(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd)
IISDMA发送/接收传输完成,需要进行地址切换的中断使能
Definition: ci130x_iisdma.c:79
uint32_t block_size
Definition: ci130x_iisdma.h:211
int IISDMA_TX_ADDR_Get(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx)
返回当前TX正在传输的地址为TADDR0还是TADDR1
Definition: ci130x_iisdma.c:415
搬运3次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:144
IISDMA_RXTXxRollbackADDR
IISDMA搬运了多少次(x+1次,x为0~1023)之后,若开启地址绕回中断,将产生地址绕回中断 ...
Definition: ci130x_iisdma.h:109
IISDMA_TypeDef * IISDMAx
Definition: ci130x_iisdma.h:210
void IISDMA_RXTXClear(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdmarxtx)
清除IISDMA接收/发送的传输次数,清除之后,发送和接收的地址为当前配置的地址
Definition: ci130x_iisdma.c:382
搬运64次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:125
单次搬运128个byte的数据
Definition: ci130x_iisdma.h:99
通道0
Definition: ci130x_iisdma.h:71
FunctionalState
Definition: ci130x_system.h:86
void IISDMA_ChannelENConfig(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd)
IISDMA某个通道的发送或者接收使能
Definition: ci130x_iisdma.c:51
搬运16次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:148
IISDMAChax RxChax
Definition: ci130x_iisdma.h:222
IISDMA_TXRXSingleSIZEx tx_single_size
Definition: ci130x_iisdma.h:213
void IISDMA_EN(IISDMA_TypeDef *IISDMAx, FunctionalState cmd)
IISDMA使能控制
Definition: ci130x_iisdma.c:131
单次搬运496个byte的数据
Definition: ci130x_iisdma.h:101
搬运1次之后,若开启传输完成中断,将产生传输完成中断
Definition: ci130x_iisdma.h:140
Definition: ci130x_system.h:330
IISDMA配置结构体
Definition: ci130x_iisdma.h:208
搬运16次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:119
unsigned int IISxDMA_RXADDR(IISDMA_TypeDef *IISDMAx, IISDMAChax iisx)
返回IISDMA接收通道上次传输BM端最后一个数据的地址信息
Definition: ci130x_iisdma.c:400
搬运1024次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:129
单次搬运32个byte的数据
Definition: ci130x_iisdma.h:88
uint8_t iisdma_tx
Definition: ci130x_iisdma.h:215
uint32_t iisdma_tx_data_addr0
Definition: ci130x_iisdma.h:216
使能IISDMA RX
Definition: ci130x_iisdma.h:37
uint32_t iisdma_rx_block_num
Definition: ci130x_iisdma.h:225
uint8_t iisdma_rx
Definition: ci130x_iisdma.h:223
搬运2次之后,若开启地址绕回中断,将产生地址绕回中断
Definition: ci130x_iisdma.h:114
void IISDMA_INT_All_Clear(IISDMA_TypeDef *IISDMAx)
IISDMA所有中断状态清除
Definition: ci130x_iisdma.c:284