From 76bcd63f18c1d3fa4d06540d422d9ae6c4f1c033 Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 17 Nov 2021 13:46:59 -0500 Subject: [PATCH] try to change namespace? --- Adafruit_I2CDevice.cpp | 9 ++++----- Adafruit_I2CDevice.h | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) 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);