diff --git a/Adafruit_I2CDevice.cpp b/Adafruit_I2CDevice.cpp index e87a516..bc09e78 100644 --- a/Adafruit_I2CDevice.cpp +++ b/Adafruit_I2CDevice.cpp @@ -127,16 +127,15 @@ bool Adafruit_I2CDevice::write(const uint8_t *buffer, size_t len, bool stop, DEBUG_SERIAL.println(); } } - DEBUG_SERIAL.println(); -#endif -#ifdef DEBUG_SERIAL - DEBUG_SERIAL.print("\tStop: "); - DEBUG_SERIAL.println(stop); + if (stop) { + DEBUG_SERIAL.print("\tSTOP"); + } #endif if (_wire->endTransmission(stop) == 0) { #ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(); // DEBUG_SERIAL.println("Sent!"); #endif return true; diff --git a/Adafruit_I2CDevice.h b/Adafruit_I2CDevice.h index d47714f..b16fba9 100644 --- a/Adafruit_I2CDevice.h +++ b/Adafruit_I2CDevice.h @@ -6,7 +6,7 @@ ///< The class which defines how we will talk to this device over I2C class Adafruit_I2CDevice { public: - Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire); + Adafruit_I2CDevice(uint8_t addr, arduino::TwoWire *theWire = &Wire); uint8_t address(void); bool begin(bool addr_detect = true); bool detected(void); @@ -25,7 +25,7 @@ public: private: uint8_t _addr; - TwoWire *_wire; + arduino::TwoWire *_wire; bool _begun; size_t _maxBufferSize; bool _read(uint8_t *buffer, size_t len, bool stop);