WWPROM: Invert datalines only works on FT232R
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Thu, 9 Sep 2010 20:07:50 +0000 (22:07 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 20 Sep 2010 13:34:38 +0000 (15:34 +0200)
src/ftdi.c

index 3177be2..440ff54 100644 (file)
@@ -2541,8 +2541,6 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size,
     eeprom->use_serial         = buf[0x0A]&0x08;
     eeprom->change_usb_version = buf[0x0A]&0x10;
 
-    // Addr 0B: Invert data lines
-    eeprom->invert = buf[0x0B];
 
     // Addr 0C: USB version low byte when 0x0A bit 4 is set
     // Addr 0D: USB version high byte when 0x0A bit 4 is set
@@ -2638,9 +2636,8 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, unsigned char *buf, int size,
     }
     else if(ftdi->type == TYPE_R)
     {
-        // Addr 14: CBUS function: CBUS0, CBUS1
-        // Addr 15: CBUS function: CBUS2, CBUS3
-        // Addr 16: CBUS function: CBUS5
+        // Addr 0B: Invert data lines
+        // Works only on FT232R, not FT245R, but no way to distinguish
         if (ftdi->type == TYPE_R) {
             eeprom->cbus_function[0] = buf[0x14] & 0x0f;
             eeprom->cbus_function[1] = (buf[0x14] >> 4) & 0x0f;