11 #ifndef __CI130X_IIC_H_ 12 #define __CI130X_IIC_H_ 118 int32_t
i2c_master_send_recv(
char slave_ic_address,
char *buf, int32_t send_len, int32_t rev_len);
iic_multi_transmission_type
IIC 方向选择
Definition: ci130x_iic.h:72
Definition: ci130x_iic.h:36
bool(* slave_send_cb_t)(char *data, IIC_SendStateType state, IIC_AckType previous_ack)
Definition: ci130x_iic.h:80
#define HAL_IIC0_BASE
Definition: ci130x_system.h:484
iic_base_t
IIC控制器定义
Definition: ci130x_iic.h:34
int32_t i2c_master_only_recv(char slave_ic_address, char *buf, int32_t rev_len)
I2C 只接收数据
Definition: ci130x_iic.c:1367
int32_t iic_slave_polling_recv(iic_base_t base, char *buf, int32_t count)
iic slave 模式查询方式接收
Definition: ci130x_iic.c:886
int32_t iic_slave_polling_send(iic_base_t base, const char *buf, int32_t count, uint8_t *last_ack_flag)
iic slave 查询方式发送
Definition: ci130x_iic.c:769
int32_t i2c_master_send_recv(char slave_ic_address, char *buf, int32_t send_len, int32_t rev_len)
I2C 先发送数据,再接收数据
Definition: ci130x_iic.c:1336
Definition: ci130x_iic.h:64
Definition: ci130x_iic.h:75
Definition: ci130x_iic.h:74
char * buf
Definition: ci130x_iic.h:88
void IIC_IRQHandler(iic_base_t base)
iic中断统一处理函数
Definition: ci130x_iic.c:1052
Definition: ci130x_iic.h:55
Definition: ci130x_iic.h:66
IIC 传输结构体
Definition: ci130x_iic.h:86
Definition: ci130x_iic.h:37
int32_t iic_master_interrupt_send(iic_base_t base, uint16_t addr, master_send_cb_t master_send_cb)
iic master 模式中断发送注册并启动
Definition: ci130x_iic.c:640
Definition: ci130x_iic.h:56
IIC_SendStateType
IIC 发送状态选择
Definition: ci130x_iic.h:62
Definition: ci130x_iic.h:65
iic_multi_transmission_type flag
Definition: ci130x_iic.h:90
Definition: ci130x_iic.h:54
int32_t i2c_master_only_send(char slave_ic_address, const char *buf, int32_t count)
I2C 只发送数据
Definition: ci130x_iic.c:1311
Definition: ci130x_iic.h:46
bool(* slave_recv_cb_t)(char data, bool stop)
Definition: ci130x_iic.h:81
int32_t iic_master_polling_recv(iic_base_t base, uint16_t addr, char *buf, int32_t count)
iic master 查询接收
Definition: ci130x_iic.c:679
int32_t iic_slave_interrupt_recv(iic_base_t base, slave_recv_cb_t slave_recv_cb)
iic slave 中断方式接收注册(被动启动)
Definition: ci130x_iic.c:962
bool(* master_send_cb_t)(char *data, IIC_SendStateType state, IIC_AckType previous_ack)
Definition: ci130x_iic.h:78
void iic_polling_init(iic_base_t base, uint32_t speed, uint32_t slaveaddr, IIC_TimeOut timeout)
iic以查询方式初始化
Definition: ci130x_iic.c:435
int32_t iic_slave_interrupt_send(iic_base_t base, slave_send_cb_t slave_send_cb)
iic slave 中断方式发送注册(被动启动)
Definition: ci130x_iic.c:865
int32_t iic_master_interrupt_recv(iic_base_t base, uint16_t addr, master_recv_cb_t master_recv_cb)
iic master 中断方式接收注册并启动
Definition: ci130x_iic.c:730
IIC_TimeOut
IIC超时选择
Definition: ci130x_iic.h:43
IIC_AckType
IIC ACK状态选择
Definition: ci130x_iic.h:52
int32_t iic_master_multi_transmission(iic_base_t base, uint16_t addr, multi_transmission_msg *msg, int msg_count)
iic 传输多个消息
Definition: ci130x_iic.c:984
bool(* master_recv_cb_t)(char data, bool stop)
Definition: ci130x_iic.h:79
int size
Definition: ci130x_iic.h:89
Definition: ci130x_iic.h:45
int32_t iic_master_polling_send(iic_base_t base, uint16_t addr, const char *buf, int32_t count, uint8_t *last_ack_flag)
iic master 查询方式发送数据
Definition: ci130x_iic.c:589
void iic_interrupt_init(iic_base_t base, uint32_t speed, uint32_t slaveaddr, IIC_TimeOut timeout)
iic以中断方式初始化
Definition: ci130x_iic.c:510