![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
CI130X芯片iisdma驱动 更多...
结构体 | |
struct | iisdma_config_t |
IISDMA配置结构体 更多... | |
类型定义 | |
typedef struct iisdma_config_t * | iisdma_config_p |
函数 | |
void | IISDMA_ChannelENConfig (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd) |
IISDMA某个通道的发送或者接收使能 更多... | |
void | IISDMA_ADDRRollBackINT (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd) |
IISDMA发送/接收传输完成,需要进行地址切换的中断使能 更多... | |
void | IISDMA_ChannelIntENConfig (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel, FunctionalState cmd) |
IISDMA发送/接收通道数据传输完成一次中断使能 更多... | |
void | IISDMA_EN (IISDMA_TypeDef *IISDMAx, FunctionalState cmd) |
IISDMA使能控制 更多... | |
void | IISxDMA_RADDR (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int rxaddr) |
IISDMA接收地址配置 更多... | |
void | IISxDMA_RNUM (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXxInterrupt iisrxtointerrupt, IISDMA_RXTXxRollbackADDR rollbacktimes, IISDMA_TXRXSingleSIZEx rxsinglesize) |
IISDMA接收数据长度配置 更多... | |
void | IISxDMA_TADDR0 (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int txaddr0) |
IISDMA TADDR0 发送地址寄存器配置 更多... | |
void | IISxDMA_TNUM0 (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr, IISDMA_TXRXSingleSIZEx txsinglesize) |
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小 更多... | |
void | IISxDMA_TADDR1 (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, unsigned int txaddr1) |
IISDMA TADDR1 发送地址寄存器配置 更多... | |
void | IISxDMA_TNUM1 (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_RXTXxRollbackADDR rollbackaddr, IISDMA_TXRXSingleSIZEx txsinglesize) |
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小 更多... | |
void | IISDMA_PriorityConfig (IISDMA_TypeDef *IISDMAx, IISDMA_Priorityx iisdma_priority) |
IISDMA优先级设置 更多... | |
void | IISDMA_INT_All_Clear (IISDMA_TypeDef *IISDMAx) |
IISDMA所有中断状态清除 更多... | |
void | IISDMA_INT_Clear (IISDMA_TypeDef *IISDMAx, unsigned int tmp) |
IISDMA单独清除某个通道的中断 更多... | |
int | IISDMA_ADDRRollBackSTATE (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdma_txrx_sel) |
IISDMA发送/接收传输通道完成一次地址切换的状态 更多... | |
int | CHECK_IISDMA_DATABUSBUSY (IISDMA_TypeDef *IISDMAx) |
IISDMA数据总线busy状态 更多... | |
void | IISDMA_RXCompleteClear (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx) |
清除IISDMA接收通道完成传输的计数 更多... | |
void | IISxDMA_TXADDRRollbackInterruptClear (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXADDR_Sel txrestart_addr) |
清除IISDMA发送内部的传输次数,并选择下一次传输开始的地址为TADDR0或者TADDR1 更多... | |
void | IISDMA_RXTXClear (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx, IISDMA_TXRX_ENx iisdmarxtx) |
清除IISDMA接收/发送的传输次数,清除之后,发送和接收的地址为当前配置的地址 更多... | |
unsigned int | IISxDMA_RXADDR (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx) |
返回IISDMA接收通道上次传输BM端最后一个数据的地址信息 更多... | |
int | IISDMA_TX_ADDR_Get (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx) |
返回当前TX正在传输的地址为TADDR0还是TADDR1 更多... | |
uint32_t | Get_IISxDMA_RADDR (IISDMA_TypeDef *IISDMAx, IISDMAChax iisx) |
返回当前IISDMA数据接收,存储的首地址 更多... | |
void | iisdma_config (iisdma_config_p config) |
IISDMA配置 更多... | |
CI130X芯片iisdma驱动
struct iisdma_config_t |
IISDMA配置结构体
成员变量 | ||
---|---|---|
uint32_t | block_size |
音频数据大小 |
uint8_t | iisdma_rx |
RX通道配置开关 |
uint32_t | iisdma_rx_block_num |
RX接收block数量 |
uint32_t | iisdma_rx_data_addr |
RX接收起始地址 |
uint8_t | iisdma_tx |
TX通道配置开关 |
uint32_t | iisdma_tx_block_num0 |
TX发送block数量0 |
uint32_t | iisdma_tx_block_num1 |
TX发送block数量1 |
uint32_t | iisdma_tx_data_addr0 |
TX发送地址0 |
uint32_t | iisdma_tx_data_addr1 |
TX发送地址1 |
IISDMA_TypeDef * | IISDMAx |
IISDMA控制器 |
IISDMA_TXRXSingleSIZEx | rx_single_size |
RX单次搬运的数据大小 |
IISDMAChax | RxChax |
RX通道选择 |
IISDMA_TXRXSingleSIZEx | tx_single_size |
TX单次搬运的数据大小 |
IISDMAChax | TxChax |
TX通道选择 |
typedef struct iisdma_config_t* iisdma_config_p |
IISDMA搬运了多少次(x+1次,x为0~1023)之后,若开启地址绕回中断,将产生地址绕回中断
IISDMA传输多少次(x+1次,x为0~31)之后,若开启传输完成中断,来传输完成中断
IISDMA单次搬运的数据大小,16*x个byte,x为1~31
int CHECK_IISDMA_DATABUSBUSY | ( | IISDMA_TypeDef * | IISDMAx | ) |
IISDMA数据总线busy状态
IISDMAx | IISDMA0 |
0 | 空闲 |
1 | 数据正在传输 |
uint32_t Get_IISxDMA_RADDR | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx | ||
) |
返回当前IISDMA数据接收,存储的首地址
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
uint32_t | 当前IISDMA数据接收,存储的首地址 |
void IISDMA_ADDRRollBackINT | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXRX_ENx | iisdma_txrx_sel, | ||
FunctionalState | cmd | ||
) |
IISDMA发送/接收传输完成,需要进行地址切换的中断使能
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisdma_txrx_sel | RX或者TX选择 |
cmd | 使能或者禁止 |
int IISDMA_ADDRRollBackSTATE | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXRX_ENx | iisdma_txrx_sel | ||
) |
IISDMA发送/接收传输通道完成一次地址切换的状态
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisdma_txrx_sel | RX或者TX选择 |
0 | 通道传输未完成一次地址切换 |
1 | 通道传输完成一次地址切换 |
void IISDMA_ChannelENConfig | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXRX_ENx | iisdma_txrx_sel, | ||
FunctionalState | cmd | ||
) |
IISDMA某个通道的发送或者接收使能
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisdma_txrx_sel | RX或者TX选择 |
cmd | 使能或者禁止 |
void IISDMA_ChannelIntENConfig | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXRX_ENx | iisdma_txrx_sel, | ||
FunctionalState | cmd | ||
) |
IISDMA发送/接收通道数据传输完成一次中断使能
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisdma_txrx_sel | RX或者TX选择 |
cmd | 使能或者禁止 |
void iisdma_config | ( | iisdma_config_p | config | ) |
IISDMA配置
config | 配置结构体 |
void IISDMA_EN | ( | IISDMA_TypeDef * | IISDMAx, |
FunctionalState | cmd | ||
) |
IISDMA使能控制
IISDMAx | IISDMAx IISDMA0 |
cmd | 使能或者禁止 |
void IISDMA_INT_All_Clear | ( | IISDMA_TypeDef * | IISDMAx | ) |
IISDMA所有中断状态清除
IISDMAx | IISDMAx IISDMA0 |
void IISDMA_INT_Clear | ( | IISDMA_TypeDef * | IISDMAx, |
unsigned int | tmp | ||
) |
IISDMA单独清除某个通道的中断
IISDMAx | IISDMAx IISDMA0 |
tmp | 需要清除的中断位 |
void IISDMA_PriorityConfig | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMA_Priorityx | iisdma_priority | ||
) |
IISDMA优先级设置
IISDMAx | IISDMAx IISDMA0 |
iisdma_priority | 配置优先级响应顺序 |
void IISDMA_RXCompleteClear | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx | ||
) |
清除IISDMA接收通道完成传输的计数
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
void IISDMA_RXTXClear | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXRX_ENx | iisdmarxtx | ||
) |
清除IISDMA接收/发送的传输次数,清除之后,发送和接收的地址为当前配置的地址
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisdmarxtx | RX或者TX选择 |
int IISDMA_TX_ADDR_Get | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx | ||
) |
返回当前TX正在传输的地址为TADDR0还是TADDR1
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
0 | 当前正在传输TADDR0 |
1 | 当前正在传输TADDR1 |
void IISxDMA_RADDR | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
unsigned int | rxaddr | ||
) |
IISDMA接收地址配置
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
rxaddr | 接收地址 |
void IISxDMA_RNUM | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_RXxInterrupt | iisrxtointerrupt, | ||
IISDMA_RXTXxRollbackADDR | rollbacktimes, | ||
IISDMA_TXRXSingleSIZEx | rxsinglesize | ||
) |
IISDMA接收数据长度配置
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
iisrxtointerrupt | 接收通道完成(iisrxtointerrupt+1)次请求,产生传输完成中断 |
rollbacktimes | 接收通道完成(rollbacktimes +1)次传输后,传输地址跳转到RADDR,并产生地址切换中断 |
rxsinglesize | 接收通道每次请求发送的数据大小 (16*rxsinglesize)字节 |
unsigned int IISxDMA_RXADDR | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx | ||
) |
返回IISDMA接收通道上次传输BM端最后一个数据的地址信息
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
unsigned | int 地址 |
void IISxDMA_TADDR0 | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
unsigned int | txaddr0 | ||
) |
IISDMA TADDR0 发送地址寄存器配置
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
txaddr0 | TADDR0地址 |
void IISxDMA_TADDR1 | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
unsigned int | txaddr1 | ||
) |
IISDMA TADDR1 发送地址寄存器配置
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
txaddr1 | TADDR1地址 |
void IISxDMA_TNUM0 | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_RXTXxRollbackADDR | rollbackaddr, | ||
IISDMA_TXRXSingleSIZEx | txsinglesize | ||
) |
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
rollbackaddr | 发送通道完成(rollbackaddr +1)次传输后,传输地址跳转到TADDR1,并产生传输地址切换中断 |
txsinglesize | 发送通道每次请求发送的数据大小 (16*txsinglesize)字节 |
void IISxDMA_TNUM1 | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_RXTXxRollbackADDR | rollbackaddr, | ||
IISDMA_TXRXSingleSIZEx | txsinglesize | ||
) |
配置发送通道传输多少次后产生地址切换中断,及每次发送的数据大小
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
rollbackaddr | 发送通道完成(rollbackaddr +1)次传输后,传输地址跳转到TADDR0,并产生地址切换中断 |
txsinglesize | 发送通道每次请求发送的数据大小 (16*txsinglesize)字节 |
void IISxDMA_TXADDRRollbackInterruptClear | ( | IISDMA_TypeDef * | IISDMAx, |
IISDMAChax | iisx, | ||
IISDMA_TXADDR_Sel | txrestart_addr | ||
) |
清除IISDMA发送内部的传输次数,并选择下一次传输开始的地址为TADDR0或者TADDR1
IISDMAx | IISDMA0 |
iisx | IISDMACha0、IISDMACha1、IISDMACha2通道可选 |
txrestart_addr | 下一次传输的起始地址TADDR0或者TADDR1 |