From 6804a451b3a64cdd20f05dfb4544b4b6fe748571 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 24 Nov 2021 17:55:52 +0700 Subject: [PATCH] skip wire end() for ESP8266 --- Adafruit_I2CDevice.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Adafruit_I2CDevice.cpp b/Adafruit_I2CDevice.cpp index 0e761be..ca36f21 100644 --- a/Adafruit_I2CDevice.cpp +++ b/Adafruit_I2CDevice.cpp @@ -35,9 +35,12 @@ bool Adafruit_I2CDevice::begin(bool addr_detect) { return true; } -void Adafruit_I2CDevice::end(void) -{ +void Adafruit_I2CDevice::end(void) { +#ifndef ESP8266 + // ESP8266 does not implement Wire::end() _wire->end(); +#endif + _begun = false; }