i was using i2c_reg_read_byte and i2c_reg_write_byte commands for reading and writing in the code and everything is working fine and now i am using different sensor in which i had to read 2 bytes for reading and writing and i am stuck there
i was using i2c_reg_read_byte and i2c_reg_write_byte commands for reading and writing in the code and everything is working fine and now i am using different sensor in which i had to read 2 bytes for reading and writing and i am stuck there
If you want to do a read/write of more than one byte then you can use the API provided in zephyr\include\zephyr\drivers\i2c.h, for example
static inline int i2c_read(const struct device *dev, uint8_t *buf, uint32_t num_bytes, uint16_t addr)