Skip to content

Commit

Permalink
Merge pull request #13 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 authored Aug 27, 2019
2 parents 3886502 + 735ffa4 commit d5dfced
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adafruit_l3gd20.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ def read_register(self, register):
"""
self.buffer[0] = register
with self.i2c_device as i2c:
i2c.write(self.buffer, end=1, stop=False)
i2c.readinto(self.buffer, start=1)
i2c.write_then_readinto(self.buffer, self.buffer, out_end=1, in_start=1)
return self.buffer[1]

class L3GD20_SPI(L3GD20):
Expand Down

0 comments on commit d5dfced

Please sign in to comment.