![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
CI110X芯片IIC模块的驱动程序头文件 更多...
#include <stdbool.h>
#include "ci130x_system.h"
#include "ci130x_scu.h"
#include "ci130x_core_eclic.h"
#include "ci130x_core_misc.h"
结构体 | |
struct | multi_transmission_msg |
IIC 传输结构体 更多... | |
union | multi_transmission_msg.__unnamed__ |
类型定义 | |
typedef bool(* | master_send_cb_t) (char *data, IIC_SendStateType state, IIC_AckType previous_ack) |
typedef bool(* | master_recv_cb_t) (char data, bool stop) |
typedef bool(* | slave_send_cb_t) (char *data, IIC_SendStateType state, IIC_AckType previous_ack) |
typedef bool(* | slave_recv_cb_t) (char data, bool stop) |
枚举 | |
enum | iic_base_t { IIC0 = HAL_IIC0_BASE, IIC_NULL = 0 } |
IIC控制器定义 更多... | |
enum | IIC_TimeOut { LONG_TIME_OUT = 0X5FFFFF, SHORT_TIME_OUT = 0XFFFF } |
IIC超时选择 更多... | |
enum | IIC_AckType { IIC_ACKTYPE_ERR = -1, IIC_ACKTYPE_ACK = 0, IIC_ACKTYPE_NACK = 1 } |
IIC ACK状态选择 更多... | |
enum | IIC_SendStateType { IIC_SENDSTATE_OK = 0, IIC_SENDSTATE_STOP = 1, IIC_SENDSTATE_NOTIFY = 2 } |
IIC 发送状态选择 更多... | |
enum | iic_multi_transmission_type { IIC_M_WRITE = 0, IIC_M_READ = 1 } |
IIC 方向选择 更多... | |
函数 | |
void | iic_polling_init (iic_base_t base, uint32_t speed, uint32_t slaveaddr, IIC_TimeOut timeout) |
iic以查询方式初始化 更多... | |
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 查询方式发送数据 更多... | |
int32_t | iic_master_polling_recv (iic_base_t base, uint16_t addr, char *buf, int32_t count) |
iic master 查询接收 更多... | |
int32_t | iic_master_multi_transmission (iic_base_t base, uint16_t addr, multi_transmission_msg *msg, int msg_count) |
iic 传输多个消息 更多... | |
int32_t | iic_slave_polling_send (iic_base_t base, const char *buf, int32_t count, uint8_t *last_ack_flag) |
iic slave 查询方式发送 更多... | |
int32_t | iic_slave_polling_recv (iic_base_t base, char *buf, int32_t count) |
iic slave 模式查询方式接收 更多... | |
void | iic_interrupt_init (iic_base_t base, uint32_t speed, uint32_t slaveaddr, IIC_TimeOut timeout) |
iic以中断方式初始化 更多... | |
int32_t | iic_master_interrupt_send (iic_base_t base, uint16_t addr, master_send_cb_t master_send_cb) |
iic master 模式中断发送注册并启动 更多... | |
int32_t | iic_master_interrupt_recv (iic_base_t base, uint16_t addr, master_recv_cb_t master_recv_cb) |
iic master 中断方式接收注册并启动 更多... | |
int32_t | iic_slave_interrupt_send (iic_base_t base, slave_send_cb_t slave_send_cb) |
iic slave 中断方式发送注册(被动启动) 更多... | |
int32_t | iic_slave_interrupt_recv (iic_base_t base, slave_recv_cb_t slave_recv_cb) |
iic slave 中断方式接收注册(被动启动) 更多... | |
void | IIC_IRQHandler (iic_base_t base) |
iic中断统一处理函数 更多... | |
int32_t | i2c_master_only_send (char slave_ic_address, const char *buf, int32_t count) |
I2C 只发送数据 更多... | |
int32_t | i2c_master_send_recv (char slave_ic_address, char *buf, int32_t send_len, int32_t rev_len) |
I2C 先发送数据,再接收数据 更多... | |
int32_t | i2c_master_only_recv (char slave_ic_address, char *buf, int32_t rev_len) |
I2C 只接收数据 更多... | |
CI110X芯片IIC模块的驱动程序头文件