Skip to content

Commit 908e0da

Browse files
authored
Merge pull request #15 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents 5639bbe + cd3aedb commit 908e0da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_is31fl3731.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ def _i2c_read_reg(self, reg, result):
101101
while not self.i2c.try_lock():
102102
pass
103103
try:
104-
self.i2c.writeto(self.address, bytes([reg]), stop=False)
105-
self.i2c.readfrom_into(self.address, result)
104+
self.i2c.writeto_then_readfrom(self.address, bytes([reg]), result)
106105
return result
107106
finally:
108107
self.i2c.unlock()

0 commit comments

Comments
 (0)