Investigate I2C issues
In commit cf203e0c an issue was "fixed" but only by a workaround solution.
The issue was, that the contents of the rxbuf
variable would not be written by the apalI2CMasterTransmit()
function call, resulting in apparently correct values, even if they were not.
With the workaround in place, rxbuf
would contain only zeros, indicating that something went wrong.
However, there are two major problems with this workaround:
- Even though a value of
0
can be used to detect issues for sensor values, because such would normally never be returned by the device, this is not the case for threshold values, which may be zero indeed. - In fact, the
rxbuf
must have be filled with data if theapalI2CMasterTransmit()
function does not return an error value.
As result, the actual cause of the original issue is rooted somewhere in the apalI2CMasterTransmit()
function and should be investigated.