I've been trying to read several (i.e. > 2) bytes from a given register of a device on a I2C channel.
I know in C there is a call readBytesReg listed in the documentation (mraa: I2c Class Reference):
readBytesReg (uint8_t reg, uint8_t *data, int length)
but I'm not sure what the parameters are. I tried this:
var buffer = this.i2cChannel.readBytesReg(register,numToRead) ;
and I thought it was working but I'm having trouble with one call in which the numToRead parameter equals 3. I keep getting an "I2c write failed" message.
Thank you for contacting the Intel Communities.
My recommendation regarding this question, would be to visit the Intel Developer Zone Forums and post your question there.
This type of question is related to the topics handled by them.