diff --git a/sx1509_library.cpp b/sx1509_library.cpp index 32b4a78e..6d18a3a1 100644 --- a/sx1509_library.cpp +++ b/sx1509_library.cpp @@ -517,8 +517,8 @@ unsigned int sx1509Class::readWord(byte registerAddress) Wire.beginTransmission(deviceAddress); Wire.write(registerAddress); - Wire.endTransmission(); - Wire.requestFrom(deviceAddress, (byte) 2); + Wire.endTransmission(true); + Wire.requestFrom(deviceAddress, (uint8_t) 2, (uint8_t)true); while ((Wire.available() < 2) && (timeout != 0)) timeout--;