MajicDesigns / MD_DS3231

DS3231 Real Time Clock Library
GNU Lesser General Public License v2.1
30 stars 11 forks source link

No need to wait after Wire.requestFrom() #3

Closed Koepel closed 6 years ago

Koepel commented 6 years ago

The line "while (!Wire.available()) ; // wait" after the Wire.requestFrom() in the file "MD_DS3231/src/MD_DS3231.cpp" may be removed. There is nothing to wait for.

When the Wire.requestFrom() returns, the I2C transaction has completely finished and the received data is waiting in a buffer in the Wire library.