Skip to content

Commit

Permalink
Merge pull request #16 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 b89e652 + 23e064a commit 765c81c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adafruit_drv2605.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ def _read_u8(self, address):
# Read an 8-bit unsigned value from the specified 8-bit address.
with self._device as i2c:
self._BUFFER[0] = address & 0xFF
i2c.write(self._BUFFER, end=1, stop=False)
i2c.readinto(self._BUFFER, end=1)
i2c.write_then_readinto(self._BUFFER, self._BUFFER, out_end=1, in_end=1)
return self._BUFFER[0]

def _write_u8(self, address, val):
Expand Down

0 comments on commit 765c81c

Please sign in to comment.