Skip to content

Commit 40130c2

Browse files
authored
Merge pull request #5 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents 551ed5a + 917fedf commit 40130c2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_tmp006.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ def read_register(self, register):
160160
def _read_u16(self, address):
161161
with self._device as i2c:
162162
self._BUFFER[0] = address & 0xFF
163-
i2c.write(self._BUFFER, end=1, stop=False)
164-
i2c.readinto(self._BUFFER, end=2)
163+
i2c.write_then_readinto(self._BUFFER, self._BUFFER, out_end=1, in_end=2)
165164
return self._BUFFER[0]<<8 | self._BUFFER[1]
166165

167166
def _write_u16(self, address, val):

0 commit comments

Comments
 (0)