Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hello,
My situation is this. I want to read from device addresss 0x72, register address 0x01 data which is 16 bit long.
It seems that it is not possible to give address and register addres in i2c.read commad. How to do this?
If I use:
wdata[0] = 0x01;
i2c.write(addr, wdata, 1); // Set pointer to location 01h (first echo)
pc.printf("Data: '%s'\n",i2c.read(addr, wdata, 2))
it doesnt work and with oscilloscope i can see that it really writes 2 times that address.
BR,
-Eric-