libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, eeprom-new, updated. v0.17-138-gc2700d6

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 24 Sep 2010 16:40:59 +0200 (CEST)
The branch, eeprom-new has been updated
       via  c2700d6da86375b156e16cafb52085fbf5594136 (commit)
      from  a45ea32b4ffd3f5aa04aabaac810e89a35916a3f (commit)


- Log -----------------------------------------------------------------
commit c2700d6da86375b156e16cafb52085fbf5594136
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date:   Fri Sep 24 16:40:57 2010 +0200

    Don't output PnP options for BM type chips

-----------------------------------------------------------------------

Summary of changes:
 src/ftdi.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/ftdi.c b/src/ftdi.c
index 2d10e72..bd81306 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -2440,24 +2440,27 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
         output[i & eeprom_size_mask] = eeprom->serial[j], i++;
         output[i & eeprom_size_mask] = 0x00, i++;
     }
-    output[i & eeprom_size_mask] = 0x02; /* as seen when written with FTD2XX */
-    i++;
-    output[i & eeprom_size_mask] = 0x03; /* as seen when written with FTD2XX */
-    i++;
-    output[i & eeprom_size_mask] = eeprom->is_not_pnp; /* as seen when written 
with FTD2XX */
-    i++;
+
+    // Legacy port name and PnP fields for FT2232 and newer chips
+    if (ftdi->type > TYPE_BM)
+    {
+        output[i & eeprom_size_mask] = 0x02; /* as seen when written with 
FTD2XX */
+        i++;
+        output[i & eeprom_size_mask] = 0x03; /* as seen when written with 
FTD2XX */
+        i++;
+        output[i & eeprom_size_mask] = eeprom->is_not_pnp; /* as seen when 
written with FTD2XX */
+        i++;
+    }
 
     output[0x13] = serial_size*2 + 2;
 
-    if(ftdi->type > TYPE_AM) /*use_serial not used in AM devices*/
+    if(ftdi->type > TYPE_AM) /* use_serial not used in AM devices */
     {
         if (eeprom->use_serial == USE_SERIAL_NUM )
             output[0x0A] |= USE_SERIAL_NUM;
         else
             output[0x0A] &= ~USE_SERIAL_NUM;
     }
-    /* Fixme: ftd2xx seems to append 0x02, 0x03 and 0x01 for PnP = 0 or 0x00 
else */
-    // calculate checksum
 
     /* Bytes and Bits specific to (some) types
        Write linear, as this allows easier fixing*/


hooks/post-receive
-- 
port libftdi to libusb-1.0

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

Current Thread
  • port libftdi to libusb-1.0 branch, eeprom-new, updated. v0.17-138-gc2700d6, libftdi-git <=