The branch, master has been updated
       via  d4b5af27db53a281adb134aaa91b75335accb57d (commit)
      from  7069aa4648527fcfdc26c39a45303c30897d7399 (commit)


- Log -----------------------------------------------------------------
commit d4b5af27db53a281adb134aaa91b75335accb57d
Author: Uwe Bonnes <[email protected]>
Date:   Wed Aug 31 18:57:27 2011 +0200

    EEPROM: treat USE_SERIAL as bool, not a flag

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

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

diff --git a/src/ftdi.c b/src/ftdi.c
index 9691b8f..612376b 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -2218,7 +2218,7 @@ int ftdi_eeprom_initdefaults(struct ftdi_context *ftdi, 
char * manufacturer,
         ftdi_error_return(-3, "No connected device or device not yet opened");
 
     eeprom->vendor_id = 0x0403;
-    eeprom->use_serial = USE_SERIAL_NUM;
+    eeprom->use_serial = 1;
     if ((ftdi->type == TYPE_AM) || (ftdi->type == TYPE_BM) ||
             (ftdi->type == TYPE_R))
         eeprom->product_id = 0x6001;
@@ -2569,7 +2569,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
 
     if (ftdi->type > TYPE_AM) /* use_serial not used in AM devices */
     {
-        if (eeprom->use_serial == USE_SERIAL_NUM )
+        if (eeprom->use_serial)
             output[0x0A] |= USE_SERIAL_NUM;
         else
             output[0x0A] &= ~USE_SERIAL_NUM;
@@ -2884,7 +2884,7 @@ int ftdi_eeprom_decode(struct ftdi_context *ftdi, int 
verbose)
     eeprom->in_is_isochronous  = buf[0x0A]&0x01;
     eeprom->out_is_isochronous = buf[0x0A]&0x02;
     eeprom->suspend_pull_downs = buf[0x0A]&0x04;
-    eeprom->use_serial         = buf[0x0A] & USE_SERIAL_NUM;
+    eeprom->use_serial         = (buf[0x0A] & USE_SERIAL_NUM)?1:0;
     eeprom->use_usb_version    = buf[0x0A] & USE_USB_VERSION_BIT;
 
     // Addr 0C: USB version low byte when 0x0A


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 [email protected]   

Reply via email to