Skip to content

Commit 256f7de

Browse files
authored
Merge pull request #10 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents 6dbc5e7 + 5ec51d1 commit 256f7de

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_cap1188/i2c.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ def _read_register(self, address):
6464
"""Return 8 bit value of register at address."""
6565
self._buf[0] = address
6666
with self._i2c as i2c:
67-
i2c.write(self._buf, end=1, stop=False)
68-
i2c.readinto(self._buf, start=1)
67+
i2c.write_then_readinto(self._buf, self._buf, out_end=1, in_start=1)
6968
return self._buf[1]
7069

7170
def _write_register(self, address, value):

0 commit comments

Comments
 (0)