From e56a5166d9a1f933702bfa6eeae4dc3fc0155e24 Mon Sep 17 00:00:00 2001 From: ladyada Date: Fri, 5 Apr 2019 01:40:30 -0400 Subject: [PATCH] fix some compiler complaints --- Adafruit_I2CDevice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Adafruit_I2CDevice.cpp b/Adafruit_I2CDevice.cpp index 3cae6f2..eead63d 100644 --- a/Adafruit_I2CDevice.cpp +++ b/Adafruit_I2CDevice.cpp @@ -64,13 +64,13 @@ bool Adafruit_I2CDevice::write(uint8_t *buffer, size_t len, bool stop, uint8_t * #ifdef DEBUG_SERIAL DEBUG_SERIAL.print(F("\tI2CDevice Wrote: ")); if ((prefix_len != 0) && (prefix_buffer != NULL)) { - for (int i=0; irequestFrom(_addr, (uint8_t)len, stop) != len) { + if (_wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop) != len) { // Not enough data available to fulfill our obligation! #ifdef DEBUG_SERIAL DEBUG_SERIAL.println(F("\tI2CDevice did not receive enough data")); @@ -110,7 +110,7 @@ bool Adafruit_I2CDevice::read(uint8_t *buffer, size_t len, bool stop) { #ifdef DEBUG_SERIAL DEBUG_SERIAL.print(F("\tI2CDevice Read: ")); - for (int i=0; i