Move include/urjtag/usbconn/*.h to src/tap/usbconn/; move urj_cmd_params() and urj_cmd_get_number() to src/cmd/cmd.h. These are in fact local includes.

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1637 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent ebb0861971
commit 419ce7bd36

@ -1,18 +1,34 @@
2009-05-28 Rutger Hofman <rfhh>
* include/urjtag/cmd.h, src/cmd/cmd.h: move defitions from public to private
include file because these parameter utilities are no longer used outside
cmd
* include/urjtag/usbconn/*.h: move to src/tap/usbconn/ because these are
actually internal include files
2009-05-28 Rutger Hofman <rfhh>
* src/global/urjtag.c, src/global/Makefile.am: rename urjtag.c to
src/global/log-error.c
* src/global/params.c, src/global/Makefile.am, include/urjtag/params.h,
include/urjtag/Makefile.am: data structure for key/value pairs
* src/bus/*, include/urjtag/bus_driver.h, include/urjtag/bus.h,
src/cmd/cmd_initbus.c: have an API call initbus() that uses key/value
pairs to pass in options
* src/tap/cable.c, src/tap/parport.c, src/tap/usbconn.c, src/tap/cable/*,
src/tap/parport/*, src/tap/usbconn/*, include/urjtag/cable.h: have API
calls urj_tap_cable_parport_connect(), urj_tap_cable_usb_connect(),
urj_tap_cable_other_connect(); have a tagged union in the cable driver
that offers driver-specific connect() calls.
* src/cmd/cmd_cable.c, src/tap/cable/wiggler.c: the 4th wiggler argument,
the pin bitmap, is now a key/value parameter with key 'bitmap='.
2009-05-28 Mike Frysinger <vapier@gentoo.org>
* configure.ac: improve svn rev look up by ignoring errors, unifying

@ -54,6 +54,4 @@ pkginclude_HEADERS = \
types.h \
urjtag.h \
usbconn.h \
usbconn/libftdx.h \
usbconn/libusb.h \
xpcu.h

@ -56,9 +56,4 @@ int urj_cmd_run (urj_chain_t *chain, char *params[]);
*/
char *urj_cmd_find_next (const char *text, int state);
/* @@@@ RFHH candidate to become local in src/cmd/ after cable refactor */
int urj_cmd_params (char *params[]);
/* @@@@ RFHH candidate to become local in src/cmd/ after cable refactor */
int urj_cmd_get_number (const char *s, long unsigned *i);
#endif /* URJ_CMD_H */

@ -1,39 +0,0 @@
/*
* $Id$
*
* 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
*
*/
/* @@@@ RFHH candidate for internal include file? */
#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

@ -1,41 +0,0 @@
/*
* $Id$
*
* 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
*
*/
/* @@@@ RFHH candidate for internal include file? */
#ifndef URJ_USBCONN_LIBUSB_H
#define URJ_USBCONN_LIBUSB_H 1
#include <usb.h>
typedef struct
{
struct usb_device *dev;
struct usb_dev_handle *handle;
void *data;
} urj_usbconn_libusb_param_t;
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -102,4 +102,14 @@ extern const urj_cmd_t *urj_cmds[];
*/
int urj_cmd_test_cable (urj_chain_t *chain);
/**
* Count the number of parameters in this NULL-terminated list
*/
int urj_cmd_params (char *params[]);
/**
* Parse parameter as a long unsigned
* @return URJ_STATUS_OK on success, URJ_STATUS_FAIL on error
*/
int urj_cmd_get_number (const char *s, long unsigned *i);
#endif /* URJ_CMD_H */

@ -125,6 +125,7 @@ endif
if HAVE_LIBUSB
libtap_la_SOURCES += \
usbconn/libusb.c
usbconn/libusb.h
endif
@ -135,7 +136,8 @@ endif
if ENABLE_LOWLEVEL_FTDI
libtap_la_SOURCES += \
usbconn/libftdi.c
usbconn/libftdi.c \
usbconn/libftdx.h
endif
if ENABLE_LOWLEVEL_FTD2XX

@ -38,7 +38,7 @@
#include "generic_usbconn.h"
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libftdx.h>
#include "usbconn/libftdx.h"
#include "cmd_xfer.h"

@ -50,7 +50,7 @@ jim_cable_connect (urj_cable_t *cable, const urj_param_t *params[])
jim_cable_params_t *cable_params;
urj_jim_state_t *s;
if (urj_cmd_params (params) < 1)
if (urj_param_num (params) < 1)
{
urj_error_set (URJ_ERROR_SYNTAX, _("not enough arguments"));
return URJ_STATUS_FAIL;

@ -35,7 +35,6 @@
#include "generic_usbconn.h"
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libusb.h>
/* ---------------------------------------------------------------------- */
@ -43,6 +42,7 @@
#include <urjtag/cable.h>
#include <urjtag/chain.h>
#include "usbconn/libusb.h"
#include <usb.h>
#include <string.h>

@ -155,7 +155,7 @@ ts7800_connect (urj_cable_t *cable, const urj_param_t *params[])
{
ts7800_params_t *cable_params;
if (urj_cmd_params (params) != 1)
if (urj_param_num (params) != 1)
{
urj_error_set (URJ_ERROR_SYNTAX,
_("This cable type does not accept parameters"));

@ -37,7 +37,7 @@
#include "generic_usbconn.h"
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libftdx.h>
#include "usbconn/libftdx.h"
#include "cmd_xfer.h"

@ -198,7 +198,7 @@ ep9307_connect (urj_cable_t *cable, const urj_param_t *params[])
{
ep9307_params_t *cable_params;
if (urj_cmd_params (params) != 1)
if (urj_param_num (params) != 1)
{
urj_error_set (URJ_ERROR_SYNTAX,
_("This cable type does not accept parameters"));

@ -35,7 +35,7 @@
#include "generic_usbconn.h"
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libusb.h>
#include "usbconn/libusb.h"
#include <errno.h>
#include <string.h>

@ -42,7 +42,7 @@
#include <urjtag/error.h>
#include <urjtag/log.h>
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libftdx.h>
#include "libftdx.h"
/* enables debug output */

@ -42,7 +42,7 @@
#include <urjtag/error.h>
#include <urjtag/log.h>
#include <urjtag/usbconn.h>
#include <urjtag/usbconn/libftdx.h>
#include "libftdx.h"
typedef struct
{

Loading…
Cancel
Save