ik1xpv/ExtIO_sddc

Mismatch in FX3 code between USBhandler.c and i2cmodule.c

Closed this issue · 1 comments

Many thanks to Igor Sedov from http://coherent-receiver.com/ for signalling this FX3 code bug:

"... in (https://github.com/ik1xpv/ExtIO_sddc/blob/master/SDDC_FX3/USBhandler.c ) wLength is uint16_t and it is not obvious that the I2CTransfer in https://github.com/ik1xpv/ExtIO_sddc/blob/master/SDDC_FX3/i2cmodule.c has just unit8_t.
As a result, the provided code on host will not work properly and it will be not clear why (especially if it is a new designed hardware board). It took me about a day to find this issue.
There are no big I2C transfers in the current hardware (e.g. rx888 or lucy) and therefore it seems to be irrelevant now but the situation can change in the future."

Good catch, but I2CWFX3 is mainly for debug purpose. And I2C protocol has the limitation of uin8_t as length as well. So I don't think anyone will try to write more than 256 to a I2C device.