Fix FT232H eeprom user area size
authorDavide Michelizza <dmichelizza@gmail.com>
Wed, 23 Oct 2013 14:00:31 +0000 (16:00 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 23 Oct 2013 14:00:31 +0000 (16:00 +0200)
Trying to write the eeprom for a FT232H chip I've found some issues
in ftdi_eeprom_build():
    - the eeprom user area is misaligned
      (in the comment the offset in correct but the value used is not).

src/ftdi.c

index 8124985..26b1707 100644 (file)
@@ -2691,8 +2691,6 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
     i = 0;
     switch (ftdi->type)
     {
-        case TYPE_232H:
-            i += 2;
         case TYPE_2232H:
         case TYPE_4232H:
             i += 2;
@@ -2704,6 +2702,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
         case TYPE_BM:
             i += 0x94;
             break;
+        case TYPE_232H:
         case TYPE_230X:
             i = 0xa0;
             break;