The ftdi_read_chipid() function results sometimes in a different value
compared to the FTID_GetDeviceChipID() from the FTDI drivers (Linux or
Windows). The problem is in the two lines
b = b << 8 | b >> 8;
a = (a << 16) | b;
because the first line not only swap low and high byte of b, but also
shifts bit 8-15 of b to bit 16-23, and this may destroy the value of (a
<< 16) in the next line. Masking b like a = (a << 16) | (b & 0xffff) fix
this, but should this really fixed, because of making ftdi_read_chipid()
incompatible to older versions of libftdi?
Regards,
Matthias
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|