From 03342b1053315e38bfcaeb747d0ca1f50659b395 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 21 Aug 2019 15:56:38 -0700 Subject: [PATCH] Remove stop kwarg and use write_then_readinto. See https://github.com/adafruit/circuitpython/issues/2082 for details. --- adafruit_fxas21002c.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_fxas21002c.py b/adafruit_fxas21002c.py index 2a29f0c..7ce596f 100644 --- a/adafruit_fxas21002c.py +++ b/adafruit_fxas21002c.py @@ -123,7 +123,7 @@ def _read_u8(self, address): with self._device as i2c: self._BUFFER[0] = address & 0xFF i2c.write_then_readinto(self._BUFFER, self._BUFFER, - out_end=1, in_end=1, stop=False) + out_end=1, in_end=1) return self._BUFFER[0] def _write_u8(self, address, val): @@ -142,7 +142,7 @@ def read_raw(self): with self._device as i2c: self._BUFFER[0] = _GYRO_REGISTER_OUT_X_MSB i2c.write_then_readinto(self._BUFFER, self._BUFFER, - out_end=1, stop=False) + out_end=1) # Parse out the gyroscope data as 16-bit signed data. raw_x = struct.unpack_from('>h', self._BUFFER[0:2])[0] raw_y = struct.unpack_from('>h', self._BUFFER[2:4])[0]