[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libftdi-git
Subject:    port libftdi to libusb-1.0 branch, eeprom-new, updated. v0.17-174-g3a55cda
From:       libftdi-git () developer ! intra2net ! com
Date:       2011-01-21 8:31:41
Message-ID: 20110121083141.6E8EC278227 () developer ! intra2net ! com
[Download RAW message or body]

The branch, eeprom-new has been updated
       via  3a55cda4af2de515d7c83738a12ffc95f8865091 (commit)
       via  e6ac34c8096624d5b982a30c40eb626fbe12429d (commit)
      from  643a89ea185ffd80d07f39be887598c2a64e58a5 (commit)


- Log -----------------------------------------------------------------
commit 3a55cda4af2de515d7c83738a12ffc95f8865091
Author: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Date:   Thu Jan 20 16:51:21 2011 +0100

    Safer initialisation of ftdi_readstream
    
    Applies to both branches
    
    --
    Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

commit e6ac34c8096624d5b982a30c40eb626fbe12429d
Author: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Date:   Thu Jan 20 16:22:37 2011 +0100

    Delete some remaining debug printout
    
    Applied to all trees
    --
    Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de
    
    Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
    --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
    >From 6ba0d30b53677d27f9559057697c75c962cab117 Mon Sep 17 00:00:00 2001
    From: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
    Date: Thu, 20 Jan 2011 16:20:03 +0100
    Subject: Delete some remaining debug printout

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

Summary of changes:
 src/ftdi_stream.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/ftdi_stream.c b/src/ftdi_stream.c
index d39fc2a..6b5b61c 100644
--- a/src/ftdi_stream.c
+++ b/src/ftdi_stream.c
@@ -153,7 +153,20 @@ ftdi_readstream(struct ftdi_context *ftdi,
     int xferIndex;
     int err = 0;
     
-    fprintf(stderr, "ftdi_readstream\n");
+    /* We don't know in what state we are, switch to reset*/
+    if (ftdi_set_bitmode(ftdi,  0xff, BITMODE_RESET) < 0)
+    {
+        fprintf(stderr,"Can't reset mode\n");
+        return 1;
+    }
+    
+    /* Purge anything remaining in the buffers*/
+    if (ftdi_usb_purge_buffers(ftdi) < 0)
+    {
+        fprintf(stderr,"Can't Purge\n");
+        return 1;
+    }
+
     /*
      * Set up all transfers
      */


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@developer.intra2net.com   

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic