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

NON-OS SDK support. Tested on v2.0.0. #10

Closed valkuc closed 7 years ago

valkuc commented 7 years ago

Related discussion - https://github.com/pasko-zh/brzo_i2c/issues/9

pasko-zh commented 7 years ago

Thanks! Will check on the weekend!

valkuc commented 7 years ago

About round(). I prefer to not use floating point calculation in embedded development when it is possible to implement functionality without it. In your case this can be achieved next way: uint16_t fr_sel = (SCL_frequency_KHz + 50) / 100; One more reason why I will not use round on native SDK is because to use it, we also need to link "libm" to or code. For some reason that was fail for me. I did not investigate why it fails.