--- On Sun, 3/13/11, Mike Frysinger <[email protected]> wrote:
> unrelated changes should be split up into multiple
> patches.  i can see at 
> least 3 or 4 logically different things in this zip.

OK, I'll try again.
I need to change the baud rate for Arduino through the current
ftdi_context structure.

The patch below allows access to ftdi_param_t from the cable driver:

Index: src/tap/usbconn/libftdx.h
===================================================================
--- src/tap/usbconn/libftdx.h (revision 1902)
+++ src/tap/usbconn/libftdx.h (working copy)
@@ -53,9 +53,29 @@
 #endif

 #define URJ_DECLARE_FTDX_CABLE(v, p, d, n, c) \
-       _URJ_DECLARE_FTDI_CABLE(v, p, "ftdi"d, n, c##_ftdi) \
-       _URJ_DECLARE_FTD2XX_CABLE(v, p, "ftd2xx"d, n, c##_ftd2xx)
+       _URJ_DECLARE_FTDI_CABLE(v, p, "ftdi"d, n, c##_ftdi) \
+       _URJ_DECLARE_FTD2XX_CABLE(v, p, "ftd2xx"d, n, c##_ftd2xx)

+typedef struct
+{
+    /* USB device information */
+    unsigned int vid;
+    unsigned int pid;
+    struct ftdi_context *fc;
+    char *serial;
+    /* ftdi interface selection */
+    unsigned int interface;
+    /* send and receive buffer handling */
+    uint32_t send_buf_len;
+    uint32_t send_buffered;
+    uint8_t *send_buf;
+    uint32_t recv_buf_len;
+    uint32_t to_recv;
+    uint32_t recv_write_idx;
+    uint32_t recv_read_idx;
+    uint8_t *recv_buf;
+} ftdi_param_t;
+
 void ftdx_usbcable_help (urj_log_level_t ll, const char *cablename);

 #endif
Index: src/tap/usbconn/libftdi.c
===================================================================
--- src/tap/usbconn/libftdi.c (revision 1902)
+++ src/tap/usbconn/libftdi.c (working copy)
@@ -40,26 +40,6 @@
 #include "libftdx.h"
 #include "../usbconn.h"

-typedef struct
-{
-    /* USB device information */
-    unsigned int vid;
-    unsigned int pid;
-    struct ftdi_context *fc;
-    char *serial;
-    /* ftdi interface selection */
-    unsigned int interface;
-    /* send and receive buffer handling */
-    uint32_t send_buf_len;
-    uint32_t send_buffered;
-    uint8_t *send_buf;
-    uint32_t recv_buf_len;
-    uint32_t to_recv;
-    uint32_t recv_write_idx;
-    uint32_t recv_read_idx;
-    uint8_t *recv_buf;
-} ftdi_param_t;
-
 static int usbconn_ftdi_common_open (urj_usbconn_t *conn, urj_log_level_t ll);
 static void usbconn_ftdi_free (urj_usbconn_t *conn);



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to