You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all
I think that there is bug in default implementation of writeRead method in I2c.java
default int writeRead(byte[] writeBuffer, int writeSize, int writeOffset, byte[] readBuffer, int readSize,
int readOffset) {
return execute(() -> {
int written = write(writeBuffer, writeOffset, writeSize);
if (written != writeOffset)
throw new IllegalStateException(
"Expected to write " + writeOffset + " bytes but only wrote " + written + " bytes");
return read(readBuffer, readOffset, readSize);
});
}
The if conditions compares written to writeOffset instead of writeSize which is the number of bytes to write.
The text was updated successfully, but these errors were encountered:
Hi all
I think that there is bug in default implementation of writeRead method in I2c.java
The if conditions compares written to writeOffset instead of writeSize which is the number of bytes to write.
The text was updated successfully, but these errors were encountered: