From: Uwe Bonnes Date: Fri, 10 Sep 2010 19:38:28 +0000 (+0200) Subject: Set eeprom->release when building the eeprom content from the chip type Add releases... X-Git-Tag: v1.0rc1~133^2~79 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=6123f7abcc98374ffcfa00bf5eb3bfe9062ada50 Set eeprom->release when building the eeprom content from the chip type Add releases for TYPE_2232H and TYPE_4232H --- diff --git a/src/ftdi.c b/src/ftdi.c index a8e38dd..7ae48cb 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -2195,17 +2195,6 @@ void ftdi_eeprom_initdefaults(struct ftdi_context *ftdi) eeprom->product_id = 0x6001; else eeprom->product_id = 0x6010; - switch (ftdi->type) - { - case TYPE_2232C: - eeprom->release = 0x500; - break; - case TYPE_2232H: - eeprom->release = 0x200; - break; - default: - eeprom->release = 0; - } if (ftdi->type == TYPE_AM) eeprom->usb_version = 0x0101; else @@ -2336,7 +2325,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi, unsigned char *output) // Addr 06: Device release number (0400h for BM features) output[0x06] = 0x00; - switch (eeprom->release) { + switch (ftdi->type) { case TYPE_AM: output[0x07] = 0x02; break; @@ -2349,6 +2338,12 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi, unsigned char *output) case TYPE_R: output[0x07] = 0x06; break; + case TYPE_2232H: + output[0x07] = 0x07; + break; + case TYPE_4232H: + output[0x07] = 0x08; + break; default: output[0x07] = 0x00; }