libftdi Archives

Subject: [PATCH 0/3] various ftdi_eeprom fixes

From: Anders Larsen <al@xxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 3 Jul 2012 23:24:04 +0200
Hi,

On 2012-04-13 15:01:44, Thomas Jarosch wrote:
> Here you hardcode "256" twice into the code. Any chance you can turn this
> into a define or "const int"?
> 
> Also we should check for fread() errors if we
> are going to touch this piece of code :)

I've updated Patch 1/3 (ftdi_eeprom: Added config value "eeprom_type")
to address your concerns.

Patch 2/3 documents eeprom bit 00.0 of TYPE_R (select FT245R vs. FT232R)

Patch 3/3 lets ftdi_eeprom reset the device after flashing, eliminating
the need to re-plug the device if the USB id was changed.
This still calls into libusb directly; IMHO there's no need to implement a
libftdi API function as it's really only needed after updating the eeprom
content.

Cheers
Anders
---
 doc/EEPROM-structure |    3 ++-
 ftdi_eeprom/main.c   |   27 ++++++++++++++++++++-------
 2 files changed, 22 insertions(+), 8 deletions(-)

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread