Skip to content

Commit 765c81c

Browse files
authored
Merge pull request #16 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents b89e652 + 23e064a commit 765c81c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_drv2605.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ def _read_u8(self, address):
128128
# Read an 8-bit unsigned value from the specified 8-bit address.
129129
with self._device as i2c:
130130
self._BUFFER[0] = address & 0xFF
131-
i2c.write(self._BUFFER, end=1, stop=False)
132-
i2c.readinto(self._BUFFER, end=1)
131+
i2c.write_then_readinto(self._BUFFER, self._BUFFER, out_end=1, in_end=1)
133132
return self._BUFFER[0]
134133

135134
def _write_u8(self, address, val):

0 commit comments

Comments
 (0)