/*? * I2C bus transfer * * @param bus the I2C bus device * @param msgs the I2C message array * @param num the number of I2C message * * @return the number of messages sent */ rt_size_trt_i2c_transfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg msgs[], rt_uint32_t num);
/*? * I2C master send data * * @param[in] *bus the I2C bus device * @param[in] addr the I2C slave address * @param[in] flags the I2C message flags * @param[in] *buf the data buffer * @param[in] count the data buffer length * * @return the number of bytes sent */ rt_size_trt_i2c_master_send(struct rt_i2c_bus_device *bus, rt_uint16_t addr, rt_uint16_t flags, constrt_uint8_t *buf, rt_uint32_t count); /*? * I2C master receive data * * @param[in] *bus the I2C bus device * @param[in] addr the I2C slave address * @param[in] flags the I2C message flags * @param[out] *buf the data buffer * @param[out] count the received data length * * @return the number of bytes receive */ rt_size_trt_i2c_master_recv(struct rt_i2c_bus_device *bus, rt_uint16_t addr, rt_uint16_t flags, rt_uint8_t *buf, rt_uint32_t count);