Skip to content

Commit 4e70f39

Browse files
authored
Merge pull request #5 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents ac3cf2b + e76d860 commit 4e70f39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_boardtest/boardtest_i2c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _eeprom_i2c_wait(i2c, i2c_addr, mem_addr, timeout=1.0):
7474
timestamp = time.monotonic()
7575
while time.monotonic() < timestamp + timeout:
7676
try:
77-
i2c.writeto(i2c_addr, bytearray([mem_addr]), end=1, stop=False)
77+
i2c.writeto(i2c_addr, bytearray([mem_addr]), end=1)
7878
return True
7979
except OSError:
8080
pass
@@ -113,7 +113,7 @@ def _eeprom_i2c_read_byte(i2c, i2c_addr, mem_addr, timeout=1.0):
113113

114114
# Finish the read
115115
buf = bytearray(1)
116-
i2c.readfrom_into(i2c_addr, buf)
116+
i2c.writeto_then_readfrom(i2c_addr, bytearray([mem_addr]), buf)
117117

118118
return True, buf
119119

0 commit comments

Comments
 (0)