mathertel / Radio

An Arduino library to control FM radio chips like SI4703, SI4705, RDA5807M, TEA5767.
http://mathertel.github.io/Radio
BSD 3-Clause "New" or "Revised" License
297 stars 89 forks source link

No need to wait after Wire.requestFrom() and it should not be followed by Wire.endTransmission(). #27

Closed Koepel closed 5 years ago

Koepel commented 5 years ago

In the file "Radio/src/SI4703.cpp" the waiting after a Wire.requestFrom() may be removed. It is this line: while(Wire.available() < 32) ;

In the file "Radio/src/RDA5807M.cpp" the Wire.requestFrom() is followed by a Wire.endTransmission() in four places. Those Wire.endTransmission() may be removed.

Explanation: Common-mistakes, number 1 and 2.

mathertel commented 5 years ago

added changes to the code. Waiting for test results before creating new version.