I got a problem with the following code: After executing a routine sending a byte to a register of a slave device, then executing the following code, the result is rBuffer[1]=the old data sent onto the bus, not the data from the register with address 0x6. Please help.
Int32 status = IOM_COMPLETED;
I2c_DataParam rxdataBuffer;
rBuffer[0] = 0x6;
rxdataBuffer.slaveAddr = I2C_SLAVE_ADDR;
rxdataBuffer.buffer = &rBuffer[0];
rxdataBuffer.bufLen =sizeof(rBuffer);
rxdataBuffer.flags = I2c_READ | I2c_MASTER | I2c_START | I2c_STOP;
status = GIO_read(i2c_inoutHandle, &rxdataBuffer,
&rxdataBuffer.bufLen);