From e76d860705f0a1750c8c8d3e9e117525190403ac Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 20 Aug 2019 21:42:24 -0700 Subject: [PATCH] Remove stop kwarg and use write_then_readinto. See https://github.com/adafruit/circuitpython/issues/2082 for details. --- adafruit_boardtest/boardtest_i2c.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_boardtest/boardtest_i2c.py b/adafruit_boardtest/boardtest_i2c.py index 3de53a8..c237a32 100644 --- a/adafruit_boardtest/boardtest_i2c.py +++ b/adafruit_boardtest/boardtest_i2c.py @@ -74,7 +74,7 @@ def _eeprom_i2c_wait(i2c, i2c_addr, mem_addr, timeout=1.0): timestamp = time.monotonic() while time.monotonic() < timestamp + timeout: try: - i2c.writeto(i2c_addr, bytearray([mem_addr]), end=1, stop=False) + i2c.writeto(i2c_addr, bytearray([mem_addr]), end=1) return True except OSError: pass @@ -113,7 +113,7 @@ def _eeprom_i2c_read_byte(i2c, i2c_addr, mem_addr, timeout=1.0): # Finish the read buf = bytearray(1) - i2c.readfrom_into(i2c_addr, buf) + i2c.writeto_then_readfrom(i2c_addr, bytearray([mem_addr]), buf) return True, buf