libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, master, updated. v0.17-249-g4f95e48

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 5 Sep 2011 11:58:23 +0200 (CEST)
The branch, master has been updated
       via  4f95e48abb92ab8b19370c072281f593c39b426b (commit)
      from  2e9cc5be4eb2115cdb8a497d6b9def031b1a681e (commit)


- Log -----------------------------------------------------------------
commit 4f95e48abb92ab8b19370c072281f593c39b426b
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Mon Sep 5 11:45:31 2011 +0200

    examples/serial_test.c: Explicit set the line parameters

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

Summary of changes:
 examples/serial_test.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/examples/serial_test.c b/examples/serial_test.c
index 7c89e78..4ed0b7e 100644
--- a/examples/serial_test.c
+++ b/examples/serial_test.c
@@ -130,6 +130,21 @@ int main(int argc, char **argv)
         exit(-1);
     }
     
+    /* Set line parameters
+     *
+     * TODO: Make these parameters settable from the command line
+     *
+     * Parameters are choosen that sending a continous stream of 0x55 
+     * should give a square wave
+     *
+     */
+    f = ftdi_set_line_property(ftdi, 8, STOP_BIT_1, NONE);
+    if (f < 0)
+    {
+        fprintf(stderr, "unable to set line parameters: %d (%s)\n", f, 
ftdi_get_error_string(ftdi));
+        exit(-1);
+    }
+    
     if (do_write)
         for(i=0; i<1024; i++)
             buf[i] = pattern;


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-249-g4f95e48, libftdi-git <=