adafruit / Adafruit_CircuitPython_BusDevice

Two helper classes that handle transaction related state for I2C and SPI including locks.
MIT License
108 stars 76 forks source link

i2c_device: remove write(stop=), write_then_readinto(stop=) #55

Closed jepler closed 4 years ago

jepler commented 4 years ago

Any code that uses the stop= kwarg will get an exception at runtime. This is the incomptaible alternative compared to #54.

CircuitPython 5.x and 6.x both have writeto_then_readfrom, as does Blinka. However, this is incompatible with CircuitPython 4. We have previously dropped building the 4.x bundle so this should be OK.

The changes ended up being a bit more extensive. Testing performed was creating the accelerometer object on an adafruit clue:

>>> a = adafruit_lsm6ds.LSM6DS33(board.I2C())
>>> a.acceleration
(-1.04566, -0.34337, -9.60359)
jerryneedell commented 4 years ago

repeated my tests from #54 on this PR -- they also work fine.