TWIM/I2C, reading registers with i2c_reg_read_byte

I am testing an nRF9160 devkit with a TMP117 I2C sensor. My current goal is to read values from its registers.

My current code uses the function i2c_reg_read_byte to read values from the registers. I have successfully bound with device_get_binding and used i2c_write to find the address of the sensor, but values are read incorrectly from the registers or not at all. If I understood correctly, the register address is given as the third parameter for this function. I am unable to read the address 0Fh which should return the device ID. Additionally, this function only reads one byte, while I would need to read 16-bit values.

I use "#include <zephyr/drivers/i2c.h>" as the driver.

Is therer something that should be done differently?

Related