I am expanding a program that uses the I2C bus fairly heavily. In adding some new devices, I discovered that I had specified and incorrect address. In debugging it, I found that the I2C_Transfer() routine in FreeRTOS does not return any information indicating an error. The return value was merely 0.
The only clue that I had that something was wrong was that a read transfer did not change the value in memeory before the call.
Since failures of the bus are important in this case, how can the program determine that something went wrong on the bus?