libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v0.17-341-gf37a152

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 14 Aug 2012 17:12:34 +0200 (CEST)
The branch, master has been updated
       via  f37a15246fb738210ecc188d168039037adc50bf (commit)
      from  33e27edfe5bc48502215d2fc4a39916df97717c6 (commit)


- Log -----------------------------------------------------------------
commit f37a15246fb738210ecc188d168039037adc50bf
Author: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
Date:   Tue Aug 14 17:10:30 2012 +0200

    Fix wrong array access in set_ft232h_cbus()
    
    Changed code by Martin Devera <martin.devera@xxxxxxxxx>,
    patch and commit log by Thomas Jarosch.

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

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

diff --git a/src/ftdi.c b/src/ftdi.c
index 5a3d44e..95028e5 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -2409,9 +2409,9 @@ void set_ft232h_cbus(struct ftdi_eeprom *eeprom, unsigned 
char * output)
         if (eeprom->cbus_function[2*i+1]> CBUSH_CLK7_5)
             mode_high = CBUSH_TRISTATE;
         else
-            mode_high = eeprom->cbus_function[2*i];
+            mode_high = eeprom->cbus_function[2*i+1];
 
-        output[0x18+i] = mode_high <<4 | mode_low;
+        output[0x18+i] = (mode_high <<4) | mode_low;
     }
 }
 /* Return the bits for the encoded EEPROM Structure of a requested Mode


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. v0.17-341-gf37a152, libftdi-git <=