libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.4-34-g46ed84b

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 13 Apr 2020 23:03:23 +0200 (CEST)
The branch, master has been updated
       via  46ed84b384e8cf1d7ae9a9b0758a08419d282a27 (commit)
      from  4296ba2a9eddddfc99245929b3e3857aaa07eef5 (commit)


- Log -----------------------------------------------------------------
commit 46ed84b384e8cf1d7ae9a9b0758a08419d282a27
Author: Holger Mö�inger <h.moessinger@xxxxxxxxx>
Date:   Fri Feb 7 14:38:46 2020 +0100

    eeprom: Fix handling of high_current_drive parameter
    
    Additionally fix it up for type R chips.

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

Summary of changes:
 src/ftdi.c   |   10 +++++-----
 src/ftdi_i.h |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ftdi.c b/src/ftdi.c
index 7234229..e82514e 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -3136,23 +3136,23 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
         case TYPE_2232C:
 
             output[0x00] = type2bit(eeprom->channel_a_type, TYPE_2232C);
-            if ( eeprom->channel_a_driver == DRIVER_VCP)
+            if (eeprom->channel_a_driver == DRIVER_VCP)
                 output[0x00] |= DRIVER_VCP;
             else
                 output[0x00] &= ~DRIVER_VCP;
 
-            if ( eeprom->high_current_a == HIGH_CURRENT_DRIVE)
+            if (eeprom->high_current_a)
                 output[0x00] |= HIGH_CURRENT_DRIVE;
             else
                 output[0x00] &= ~HIGH_CURRENT_DRIVE;
 
             output[0x01] = type2bit(eeprom->channel_b_type, TYPE_2232C);
-            if ( eeprom->channel_b_driver == DRIVER_VCP)
+            if (eeprom->channel_b_driver == DRIVER_VCP)
                 output[0x01] |= DRIVER_VCP;
             else
                 output[0x01] &= ~DRIVER_VCP;
 
-            if ( eeprom->high_current_b == HIGH_CURRENT_DRIVE)
+            if (eeprom->high_current_b)
                 output[0x01] |= HIGH_CURRENT_DRIVE;
             else
                 output[0x01] &= ~HIGH_CURRENT_DRIVE;
@@ -3180,7 +3180,7 @@ int ftdi_eeprom_build(struct ftdi_context *ftdi)
             break;
         case TYPE_R:
             output[0x00] = type2bit(eeprom->channel_a_type, TYPE_R);
-            if (eeprom->high_current == HIGH_CURRENT_DRIVE_R)
+            if (eeprom->high_current)
                 output[0x00] |= HIGH_CURRENT_DRIVE_R;
             if (eeprom->channel_a_driver == DRIVER_VCP)
                 output[0x00] |= DRIVER_VCP;
diff --git a/src/ftdi_i.h b/src/ftdi_i.h
index f62795f..1bc740d 100644
--- a/src/ftdi_i.h
+++ b/src/ftdi_i.h
@@ -93,7 +93,7 @@ struct ftdi_eeprom
     int cbus_function[10];
     /** Select high current drive on R devices. */
     int high_current;
-    /** Select high current drive on A channel (2232C */
+    /** Select high current drive on A channel (2232C). */
     int high_current_a;
     /** Select high current drive on B channel (2232C). */
     int high_current_b;


hooks/post-receive
-- 
A library to talk to FTDI chips

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

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.4-34-g46ed84b, libftdi-git <=