--- In [email protected], Frédéric Feyel <[EMAIL PROTECTED]> wrote: > > (Note that the norm explicitely states that there is *no* timeout with > clock stretching : a slave can stretch the clock for seconds > if it wants/needs to do so)
Yes, even for hours if needed... That's the power of the I2C protocol. Fast devices can work with slower devices... > timing comments, so I do not want to perturb your nice > work. How can I add this check in your code ? Well, if you look closely to my changes, you will see that I've added a function macro to check if the SCL is high, next to the check for the SDA line which was already there. Search for "i2c_scl_is_high". You can add this line wherever you want into your driver version to check for the state of the SCL line. This way, you can observe if someone is holding the SCL line high or low. I'm using this check to see if the I2C bus is free, prior to generating a start condition. HTH, Best rgds, --Geert
