Skip to content

Commit 399aeea

Browse files
committed
https://github.com/adafruit/Adafruit_BusIO/issues/100
1 parent c421326 commit 399aeea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Adafruit_I2CDevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ bool Adafruit_I2CDevice::read(uint8_t *buffer, size_t len, bool stop) {
189189
bool Adafruit_I2CDevice::_read(uint8_t *buffer, size_t len, bool stop) {
190190
#if defined(TinyWireM_h)
191191
size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len);
192+
#elif defined(ARDUINO_ARCH_MEGAAVR)
193+
size_t recv = _wire->requestFrom(_addr, len, stop);
192194
#else
193195
size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop);
194196
#endif

0 commit comments

Comments
 (0)