fix 32u4 which is avr core without WIRE_HAS_END
This commit is contained in:
parent
7b97d0de31
commit
8b26deb581
|
|
@ -39,12 +39,13 @@ bool Adafruit_I2CDevice::begin(bool addr_detect) {
|
||||||
* @brief De-initialize device, turn off the Wire interface
|
* @brief De-initialize device, turn off the Wire interface
|
||||||
*/
|
*/
|
||||||
void Adafruit_I2CDevice::end(void) {
|
void Adafruit_I2CDevice::end(void) {
|
||||||
#ifndef ESP8266
|
// Not all port implement Wire::end(), such as
|
||||||
// ESP8266 does not implement Wire::end()
|
// - ESP8266
|
||||||
|
// - AVR core without WIRE_HAS_END
|
||||||
|
#if ! ( defined(ESP8266) || (defined(ARDUINO_ARCH_AVR) && !defined(WIRE_HAS_END)) )
|
||||||
_wire->end();
|
_wire->end();
|
||||||
#endif
|
|
||||||
|
|
||||||
_begun = false;
|
_begun = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue