34 #define I2C_SLAVE_DEVICE_NO_START_EN 0 147 void i2c_write_byte(
unsigned int Addr,
unsigned int AddrLen,
unsigned char Data);
156 unsigned char i2c_read_byte(
unsigned int Addr,
unsigned int AddrLen);
166 void i2c_write_series(
unsigned int Addr,
unsigned int AddrLen,
unsigned char * dataBuf,
int dataLen);
175 void i2c_read_series(
unsigned int Addr,
unsigned int AddrLen,
unsigned char * dataBuf,
int dataLen);
#define reg_i2c_id
Definition: register_8258.h:39
void i2c_gpio_set(I2C_GPIO_GroupTypeDef i2c_pin_group)
This function serves to select a pin port for I2C interface.
void i2c_read_series(unsigned int Addr, unsigned int AddrLen, unsigned char *dataBuf, int dataLen)
This function serves to read a packet of data from the specified address of slave device...
#define reg_i2c_slave_map_addrl
Definition: register_8258.h:80
static void i2c_slave_mapping_mode_data_buffer_config(unsigned char *pMapBuf)
This function servers to config i2c data buffer in slave mode.
Definition: i2c.h:102
static void reset_i2c_moudle(void)
This function reset I2C module.
Definition: i2c.h:81
void i2c_slave_init(unsigned char device_ID, I2C_SlaveMode mode, unsigned char *pMapBuf)
This function serves to set the ID and mode of slave device.
static void i2c_set_id(unsigned char SlaveID)
This function serves to set id of I2C module.
Definition: i2c.h:92
#define reg_i2c_slave_map_addrh
Definition: register_8258.h:82
void i2c_master_init(unsigned char SlaveID, unsigned char DivClock)
This function serves to set the id of slave device and the speed of I2C interface note: the param ID ...
unsigned char i2c_read_byte(unsigned int Addr, unsigned int AddrLen)
This function serves to read one byte from the slave device at the specified address.
I2C_GPIO_GroupTypeDef
select pin as SDA and SCL of i2c
Definition: i2c.h:39
#define reg_rst0
Definition: register_8258.h:143
#define reg_i2c_slave_map_addrm
Definition: register_8258.h:81
Definition: register_8258.h:146
I2C_SlaveMode
select i2c slave mode: DMA and MAPPING
Definition: i2c.h:70
void i2c_write_byte(unsigned int Addr, unsigned int AddrLen, unsigned char Data)
This function serves to write one byte to the slave device at the specified address.
void i2c_write_series(unsigned int Addr, unsigned int AddrLen, unsigned char *dataBuf, int dataLen)
This function serves to write a packet of data to the specified address of slave device.