pasko-zh / brzo_i2c

Brzo I2C is a fast I2C Implementation written in Assembly for the esp8266
GNU General Public License v3.0
244 stars 47 forks source link

Brzo i2c should support longer Clock Stretch Timeouts #6

Closed pasko-zh closed 8 years ago

pasko-zh commented 8 years ago

Currently, brzo i2c uses a uint16_t datatype for holding the number of iterations iteration_scl_clock_stretch for the timeout of SCL clock stretching. The maximum timeout is therefore around 5 msec (milli seconds).

There are i2c slaves, like for instance the HTU21, which stretch the clock up to 50 msec (milli seconds) or even more!

Thus, iteration_scl_clock_stretch should be of datatype uint32_t instead.

pasko-zh commented 8 years ago

Included in Version 1.01