From 065ab6d7ea0b94ed20a7ca69613cf6a14c5c4cf0 Mon Sep 17 00:00:00 2001 From: Rutger Hofman Date: Thu, 28 May 2009 21:22:11 +0000 Subject: [PATCH] Apparently 'svn mv' doesn't always work. Add libftdx.h and libusb.h (again) by hand git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1638 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/src/tap/usbconn/libftdx.h | 37 ++++++++++++++++++++++++++++++ urjtag/src/tap/usbconn/libusb.h | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 urjtag/src/tap/usbconn/libftdx.h create mode 100644 urjtag/src/tap/usbconn/libusb.h diff --git a/urjtag/src/tap/usbconn/libftdx.h b/urjtag/src/tap/usbconn/libftdx.h new file mode 100644 index 00000000..634b0d83 --- /dev/null +++ b/urjtag/src/tap/usbconn/libftdx.h @@ -0,0 +1,37 @@ +/* + * $Id: libftdx.h 1594 2009-05-13 23:36:04Z rfhh $ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Written by A. Laeuger, 2008 + * + */ + +#ifndef URJ_USBCONN_LIBFTDX_H +#define URJ_USBCONN_LIBFTDX_H 1 + +#define URJ_USBCONN_FTDX_MAXSEND 4096 +#define URJ_USBCONN_FTDX_MAXSEND_MPSSE (64 * 1024) + +/* Maximum chunk to receive from ftdi/ftd2xx driver. + Larger values might speed up comm, but there's an upper limit + when too many bytes are sent and the underlying libftdi or libftd2xx + don't fetch the returned data in time -> deadlock */ +#define URJ_USBCONN_FTDI_MAXRECV ( 4 * 64) +#define URJ_USBCONN_FTD2XX_MAXRECV (63 * 64) +#define URJ_USBCONN_FTDX_MAXRECV (URJ_USBCONN_FTD2XX_MAXRECV < URJ_USBCONN_FTDI_MAXRECV ? URJ_USBCONN_FTD2XX_MAXRECV : URJ_USBCONN_FTDI_MAXRECV) + +#endif diff --git a/urjtag/src/tap/usbconn/libusb.h b/urjtag/src/tap/usbconn/libusb.h new file mode 100644 index 00000000..6dfc92e1 --- /dev/null +++ b/urjtag/src/tap/usbconn/libusb.h @@ -0,0 +1,39 @@ +/* + * $Id: libusb.h 1606 2009-05-19 15:06:20Z rfhh $ + * + * Link driver for accessing USB devices via libusb + * + * Copyright (C) 2008 K. Waschk + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Written by Kolja Waschk, 2008 + * + */ + +#ifndef URJ_USBCONN_LIBUSB_H +#define URJ_USBCONN_LIBUSB_H 1 + +#include + +typedef struct +{ + struct usb_device *dev; + struct usb_dev_handle *handle; + void *data; +} urj_usbconn_libusb_param_t; + +#endif