This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfx_twim driver. How to read value from sensor's register using twim.

Hi,

I am using nrfx_twim driver, and I want to read value from sensor's register. When I want to do that sequence looks something like this:

(SENSOR_I2c_ADDR+Read_bit) +  (REGISTER_ADDR) ...... after that sequence with data from sensor's register is returned.

What macro do I need to get that effect: NRFX_TWIM_XFER_DESC_RX or NRFX_TWIM_XFER_DESC_TXRX or some combination of them.

I can't figure out where should I put that REGISTER_ADDR in these macroes.

Related