I cannot make sense of the way eeprom->size is handled.
ftdi_read_eeprom() sets it to -1 (unknown), 0x40, 0x80, 0x100 correctly
by comparing the read buffer.
ftdi_eeprom_initdefaults() clears everything, then sets it to 0x80 for
TYPE_R chip or -1 for all others.
ftdi_eeprom_build() sets it to 0x100 depending on external eeprom chip,
or to 0x80 for all others.
In my eeprom programmer, I'm calling these functions in the sequence
ftdi_read_eeprom()
ftdi_eeprom_initdefaults()
ftdi_eeprom_build()
then
ftdi_eeprom_write() to flash the chip.
I have changed ftdi_eeprom_initdefaults() and ftdi_eeprom_build()
to keep the current eeprom->size. Which works for the FT232R and
FT2232H chip that I currently have here.
Does this approach make sense, or am I overlooking something?
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|