Skip to content

Commit

Permalink
Merge pull request #15 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
kattni committed Aug 27, 2019
2 parents 5639bbe + cd3aedb commit 908e0da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adafruit_is31fl3731.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ def _i2c_read_reg(self, reg, result):
while not self.i2c.try_lock():
pass
try:
self.i2c.writeto(self.address, bytes([reg]), stop=False)
self.i2c.readfrom_into(self.address, result)
self.i2c.writeto_then_readfrom(self.address, bytes([reg]), result)
return result
finally:
self.i2c.unlock()
Expand Down

0 comments on commit 908e0da

Please sign in to comment.