libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, master, updated. v0.17-212-g26063be

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 28 Jun 2011 16:34:54 +0200 (CEST)
The branch, master has been updated
       via  26063beccb19527833b2d23877d61b56527b9985 (commit)
      from  7a172cafefbfccdc0f93916947bac74c758ae1d6 (commit)


- Log -----------------------------------------------------------------
commit 26063beccb19527833b2d23877d61b56527b9985
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Mon Jun 20 15:07:59 2011 +0200

    Fix calculation of the Mode Bitfield

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

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

diff --git a/src/ftdi.c b/src/ftdi.c
index 1e514d6..4cff47c 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -2537,7 +2537,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
             break;
         case TYPE_2232C:
 
-            output[0x00] = (1<<(eeprom->channel_a_type)) & 0x7;
+            output[0x00] = 
(eeprom->channel_a_type)?((1<<(eeprom->channel_a_type)) & 0x7):0;
             if ( eeprom->channel_a_driver == DRIVER_VCP)
                 output[0x00] |= DRIVER_VCP;
             else
@@ -2548,7 +2548,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
             else
                 output[0x00] &= ~HIGH_CURRENT_DRIVE;
 
-            output[0x01] = (1<<(eeprom->channel_b_type)) & 0x7;
+            output[0x01] = 
(eeprom->channel_b_type)?((1<<(eeprom->channel_b_type)) & 0x7):0;
             if ( eeprom->channel_b_driver == DRIVER_VCP)
                 output[0x01] |= DRIVER_VCP;
             else
@@ -2619,13 +2619,13 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
                 output[0x16] = eeprom->cbus_function[4];
             break;
         case TYPE_2232H:
-            output[0x00] = (1<<(eeprom->channel_a_type)) & 0x7;
+            output[0x00] = 
(eeprom->channel_a_type)?((1<<(eeprom->channel_a_type)) & 0x7):0;
             if ( eeprom->channel_a_driver == DRIVER_VCP)
                 output[0x00] |= DRIVER_VCP;
             else
                 output[0x00] &= ~DRIVER_VCP;
 
-            output[0x01] = (1<<(eeprom->channel_b_type)) & 0x7;
+            output[0x01] = 
(eeprom->channel_b_type)?((1<<(eeprom->channel_b_type)) & 0x7):0;
             if ( eeprom->channel_b_driver == DRIVER_VCP)
                 output[0x01] |= DRIVER_VCP;
             else
@@ -2684,7 +2684,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
             fprintf(stderr,"FIXME: Build FT4232H specific EEPROM settings\n");
             break;
         case TYPE_232H:
-            output[0x00] = (1<<(eeprom->channel_a_type)) & 0xf;
+            output[0x00] = 
(eeprom->channel_a_type)?((1<<(eeprom->channel_a_type)) & 0xf):0;
             if ( eeprom->channel_a_driver == DRIVER_VCP)
                 output[0x00] |= DRIVER_VCPH;
             else


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, master, updated. v0.17-212-g26063be, libftdi-git <=