continue
if resp[2] in (RESP_READ_COMPL, RESP_READ_PARTIAL):
break
+ else:
+ raise RuntimeError("I2C read error: max retries reached.")
# move data into buffer
chunk = min(end - start, 60)
# pylint: enable=too-many-arguments
- def i2c_configure(self, baudrate=100000):
+ def _i2c_configure(self, baudrate=100000):
"""Configure I2C"""
self._hid_xfer(
bytes(
out_start=0,
out_end=None,
in_start=0,
- in_end=None
+ in_end=None,
):
"""Write data from buffer_out to an address and then
read data from an address and into buffer_in