44 #define ERR_I2C_NAK (0x00060001UL)
45 #define ERR_I2C_BUFFER_OVERFLOW (0x00060002UL)
46 #define ERR_I2C_BYTE_COUNT_ERR (0x00060003UL)
47 #define ERR_I2C_LOSS_OF_ARBRITRATION (0x00060004UL)
48 #define ERR_I2C_SLAVE_NOT_ADDRESSED (0x00060005UL)
49 #define ERR_I2C_LOSS_OF_ARBRITRATION_NAK_BIT (0x00060006UL)
50 #define ERR_I2C_GENERAL_FAILURE (0x00060007UL)
51 #define ERR_I2C_REGS_SET_TO_DEFAULT (0x00060008UL)
52 #define ERR_I2C_TIMEOUT (0x00060009UL)
60 typedef struct I2C_PARAM {
73 typedef struct I2C_RESULT {
81 typedef enum CHIP_I2C_MODE {
92 typedef struct I2CD_API {
94 void (*i2c_isr_handler)(I2C_HANDLE_T *handle);
109 int32_t (*i2c_set_slave_addr)(I2C_HANDLE_T *handle,
uint32_t slave_addr_0_3,
uint32_t slave_mask_0);
114 int32_t (*i2c_set_bitrate)(I2C_HANDLE_T *handle,
uint32_t P_clk_in_hz,
uint32_t bitrate_in_bps);
117 int32_t (*i2c_set_timeout)(I2C_HANDLE_T *handle,
uint32_t timeout);