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 (http://iotdk.intel.com/docs/master/mraa/classmraa_1_1_i2c.html mraa: I2c Class Reference):
http://iotdk.intel.com/docs/master/mraa/classmraa_1_1_i2c.html# a811fabe49072ede2144d3118b5b8ba8f 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.
You also mention debugging; do you have the output of the debugging log?
Are you using the mini breakout board or the Arduino expansion board? What image version and mraa version are you using?
MRAA version 0.6.2
Yocto...configure_edison --version doesn't work so probably old