Skip to content

Commit 83342b0

Browse files
authored
Merge pull request #25 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents 4a54d59 + 3024de9 commit 83342b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_tsl2561.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ def _read_register(self, reg, count=1):
276276
if count == 2:
277277
self.buf[0] |= _WORD_BIT
278278
with self.i2c_device as i2c:
279-
i2c.write(self.buf, end=1, stop=False)
280-
i2c.readinto(self.buf, start=1)
279+
i2c.write_then_readinto(self.buf, self.buf, out_end=1, in_start=1)
281280
if count == 1:
282281
return self.buf[1]
283282
elif count == 2:

0 commit comments

Comments
 (0)