fieldkit / firmware

main firmware repository, including official, branded module firmware
BSD 3-Clause "New" or "Revised" License
13 stars 0 forks source link

Usage of Wire library. #1

Open Koepel opened 5 years ago

Koepel commented 5 years ago

In the files:

there is a Wire.endTransmission() after a Wire.requestFrom() and reading and writing data is mixed. Explanation about common mistakes: Common-mistakes See also my alternative explanation of the functions of the Wire library.

Do you really need the I2C_CHECK macro ?

Koepel commented 5 years ago

Update: the Wire.endTransmission() after a Wire.requestFrom() is now only in the file "firmware/fk/hal/metal/metal_board.cpp" in the function "TwoWireWrapper::read()". You may remove that Wire.endTransmission() after a Wire.requestFrom().