Skip to content

Commit

Permalink
Merge pull request #10 from tannewt/remove_stop
Browse files Browse the repository at this point in the history
Remove stop kwarg and use write_then_readinto.
  • Loading branch information
caternuson committed Aug 23, 2019
2 parents 6dbc5e7 + 5ec51d1 commit 256f7de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adafruit_cap1188/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def _read_register(self, address):
"""Return 8 bit value of register at address."""
self._buf[0] = address
with self._i2c as i2c:
i2c.write(self._buf, end=1, stop=False)
i2c.readinto(self._buf, start=1)
i2c.write_then_readinto(self._buf, self._buf, out_end=1, in_start=1)
return self._buf[1]

def _write_register(self, address, value):
Expand Down

0 comments on commit 256f7de

Please sign in to comment.