Skip to content

Commit ff0b8dc

Browse files
authored
Merge pull request #11 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents 65fd783 + 075373e commit ff0b8dc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

adafruit_fxos8700.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _read_u8(self, address):
140140
with self._device as i2c:
141141
self._BUFFER[0] = address & 0xFF
142142
i2c.write_then_readinto(self._BUFFER, self._BUFFER,
143-
out_end=1, in_end=1, stop=False)
143+
out_end=1, in_end=1)
144144
return self._BUFFER[0]
145145

146146
def _write_u8(self, address, val):
@@ -164,8 +164,7 @@ def read_raw_accel_mag(self):
164164
with self._device as i2c:
165165
self._BUFFER[0] = _FXOS8700_REGISTER_OUT_X_MSB
166166
i2c.write_then_readinto(self._BUFFER, self._BUFFER,
167-
out_end=1, in_end=6,
168-
stop=False)
167+
out_end=1, in_end=6)
169168
accel_raw_x = struct.unpack_from('>H', self._BUFFER[0:2])[0]
170169
accel_raw_y = struct.unpack_from('>H', self._BUFFER[2:4])[0]
171170
accel_raw_z = struct.unpack_from('>H', self._BUFFER[4:6])[0]
@@ -179,8 +178,7 @@ def read_raw_accel_mag(self):
179178
with self._device as i2c:
180179
self._BUFFER[0] = _FXOS8700_REGISTER_MOUT_X_MSB
181180
i2c.write_then_readinto(self._BUFFER, self._BUFFER,
182-
out_end=1, in_end=6,
183-
stop=False)
181+
out_end=1, in_end=6)
184182
mag_raw_x = struct.unpack_from('>h', self._BUFFER[0:2])[0]
185183
mag_raw_y = struct.unpack_from('>h', self._BUFFER[2:4])[0]
186184
mag_raw_z = struct.unpack_from('>h', self._BUFFER[4:6])[0]

0 commit comments

Comments
 (0)