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

Fix default end values. #45

Closed dhalbert closed 4 years ago

dhalbert commented 4 years ago

Fixes #44.

I2CDevice was passing None as a default value for end in read and write operations on busio.I2C objects. The busio.I2C documentation says that None will work, but it does not: len(buf) must be passed instead as the default.

If busio.I2C were fixed to allow None, this change could be reverted.

caternuson commented 4 years ago

Tested and works.

Thanks for quick fix @dhalbert