adafruit / Adafruit_FXOS8700

Driver for the Adafruit FSOX8700 Accelerometer/Magnetometer Breakout
MIT License
14 stars 17 forks source link

No need to wait for data after Wire.requestFrom() #2

Closed Koepel closed 7 years ago

Koepel commented 7 years ago

In Adafruit_FXOS8700.cpp, in the function read8() is a while-loop after the Wire.requestFrom() to wait for data. That line can be removed, since there is no such thing to wait for incoming data. The Wire.requestFrom() waits until the I2C transaction has completely finished. When the Wire.requestFrom() returns, the received data is in a buffer in the Wire library.

microbuilder commented 7 years ago

Fixed