unify the list of usb cable drivers

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1715 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent cd5bb2da68
commit 52e60bdd0b

@ -50,6 +50,9 @@
src/tap/cable/wiggler.c, src/tap/cable/xpc.c:
Constify the cable drivers.
* src/tap/cable/generic_usbconn_list.h, src/tap/cable/generic_usbconn.c,
src/tap/cable/generic_usbconn.h: Unify the list of usb cable drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bit.c (cmd_bit_print_params): Fix strncat length handling.

@ -35,115 +35,9 @@
#include <urjtag/cmd.h>
/* @@@@ RFHH put these in a .h file */
#ifdef ENABLE_CABLE_XPC
extern urj_usbconn_cable_t urj_tap_cable_usbconn_xpc_int;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_xpc_ext;
#endif
#ifdef ENABLE_CABLE_JLINK
extern urj_usbconn_cable_t urj_tap_cable_usbconn_jlink;
#endif
#ifdef ENABLE_CABLE_FT2232
#ifdef ENABLE_LOWLEVEL_FTD2XX
extern urj_usbconn_cable_t urj_tap_cable_usbconn_ft2232_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbocd_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbocdtiny_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbtiny_h_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_gnice_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_gniceplus_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_jtagkey_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_oocdlinks_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_turtelizer2_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbtojtagif_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_signalyzer_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_flyswatter_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbscarab2_ftd2xx;
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
extern urj_usbconn_cable_t urj_tap_cable_usbconn_ft2232_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbocd_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbocdtiny_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_armusbtiny_h_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_gnice_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_gniceplus_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_jtagkey_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_oocdlinks_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_turtelizer2_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbtojtagif_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_signalyzer_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_flyswatter_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbscarab2_ftdi;
#endif
#endif
#ifdef ENABLE_CABLE_USBBLASTER
#ifdef ENABLE_LOWLEVEL_FTD2XX
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbblaster_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_cubic_cyclonium_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_nios_eval_ftd2xx;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usb_jtag_ftd2xx;
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usbblaster_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_cubic_cyclonium_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_nios_eval_ftdi;
extern urj_usbconn_cable_t urj_tap_cable_usbconn_usb_jtag_ftdi;
#endif
#endif
urj_usbconn_cable_t *urj_tap_cable_usbconn_cables[] = {
#ifdef ENABLE_CABLE_XPC
&urj_tap_cable_usbconn_xpc_int,
&urj_tap_cable_usbconn_xpc_ext,
#endif
#ifdef ENABLE_CABLE_JLINK
&urj_tap_cable_usbconn_jlink,
#endif
#ifdef ENABLE_CABLE_FT2232
#ifdef ENABLE_LOWLEVEL_FTD2XX
&urj_tap_cable_usbconn_ft2232_ftd2xx,
&urj_tap_cable_usbconn_armusbocd_ftd2xx,
&urj_tap_cable_usbconn_armusbocdtiny_ftd2xx,
&urj_tap_cable_usbconn_armusbtiny_h_ftd2xx,
&urj_tap_cable_usbconn_gnice_ftd2xx,
&urj_tap_cable_usbconn_gniceplus_ftd2xx,
&urj_tap_cable_usbconn_jtagkey_ftd2xx,
&urj_tap_cable_usbconn_oocdlinks_ftd2xx,
&urj_tap_cable_usbconn_turtelizer2_ftd2xx,
&urj_tap_cable_usbconn_usbtojtagif_ftd2xx,
&urj_tap_cable_usbconn_signalyzer_ftd2xx,
&urj_tap_cable_usbconn_flyswatter_ftd2xx,
&urj_tap_cable_usbconn_usbscarab2_ftd2xx,
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
&urj_tap_cable_usbconn_ft2232_ftdi,
&urj_tap_cable_usbconn_armusbocd_ftdi,
&urj_tap_cable_usbconn_armusbocdtiny_ftdi,
&urj_tap_cable_usbconn_armusbtiny_h_ftdi,
&urj_tap_cable_usbconn_gnice_ftdi,
&urj_tap_cable_usbconn_gniceplus_ftdi,
&urj_tap_cable_usbconn_jtagkey_ftdi,
&urj_tap_cable_usbconn_oocdlinks_ftdi,
&urj_tap_cable_usbconn_turtelizer2_ftdi,
&urj_tap_cable_usbconn_usbtojtagif_ftdi,
&urj_tap_cable_usbconn_signalyzer_ftdi,
&urj_tap_cable_usbconn_flyswatter_ftdi,
&urj_tap_cable_usbconn_usbscarab2_ftdi,
#endif
#endif
#ifdef ENABLE_CABLE_USBBLASTER
#ifdef ENABLE_LOWLEVEL_FTD2XX
&urj_tap_cable_usbconn_usbblaster_ftd2xx,
&urj_tap_cable_usbconn_cubic_cyclonium_ftd2xx,
&urj_tap_cable_usbconn_nios_eval_ftd2xx,
&urj_tap_cable_usbconn_usb_jtag_ftd2xx,
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
&urj_tap_cable_usbconn_usbblaster_ftdi,
&urj_tap_cable_usbconn_cubic_cyclonium_ftdi,
&urj_tap_cable_usbconn_nios_eval_ftdi,
&urj_tap_cable_usbconn_usb_jtag_ftdi,
#endif
#endif
#define _URJ_USB(usb) &urj_tap_cable_usbconn_##usb,
#include "generic_usbconn_list.h"
NULL
};

@ -28,6 +28,9 @@
#include <urjtag/cable.h>
#include <urjtag/usbconn.h>
#define _URJ_USB(usb) extern urj_usbconn_cable_t urj_tap_cable_usbconn_##usb;
#include "generic_usbconn_list.h"
/**
* @return URJ_STATUS_OK on success, URJ_STATUS_FAIL and urj_error on error
*/

@ -0,0 +1,79 @@
/*
* $Id: generic_usbconn.c 1689 2010-01-08 17:06:27Z kawk $
*
* Copyright (C) 2003 ETC s.r.o.
*
* 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 Marcel Telka <marcel@telka.sk>, 2003.
*
*/
#ifdef ENABLE_CABLE_XPC
_URJ_USB(xpc_int)
_URJ_USB(xpc_ext)
#endif
#ifdef ENABLE_CABLE_JLINK
_URJ_USB(jlink)
#endif
#ifdef ENABLE_CABLE_FT2232
#ifdef ENABLE_LOWLEVEL_FTD2XX
_URJ_USB(ft2232_ftd2xx)
_URJ_USB(armusbocd_ftd2xx)
_URJ_USB(armusbocdtiny_ftd2xx)
_URJ_USB(armusbtiny_h_ftd2xx)
_URJ_USB(gnice_ftd2xx)
_URJ_USB(gniceplus_ftd2xx)
_URJ_USB(jtagkey_ftd2xx)
_URJ_USB(oocdlinks_ftd2xx)
_URJ_USB(turtelizer2_ftd2xx)
_URJ_USB(usbtojtagif_ftd2xx)
_URJ_USB(signalyzer_ftd2xx)
_URJ_USB(flyswatter_ftd2xx)
_URJ_USB(usbscarab2_ftd2xx)
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
_URJ_USB(ft2232_ftdi)
_URJ_USB(armusbocd_ftdi)
_URJ_USB(armusbocdtiny_ftdi)
_URJ_USB(armusbtiny_h_ftdi)
_URJ_USB(gnice_ftdi)
_URJ_USB(gniceplus_ftdi)
_URJ_USB(jtagkey_ftdi)
_URJ_USB(oocdlinks_ftdi)
_URJ_USB(turtelizer2_ftdi)
_URJ_USB(usbtojtagif_ftdi)
_URJ_USB(signalyzer_ftdi)
_URJ_USB(flyswatter_ftdi)
_URJ_USB(usbscarab2_ftdi)
#endif
#endif
#ifdef ENABLE_CABLE_USBBLASTER
#ifdef ENABLE_LOWLEVEL_FTD2XX
_URJ_USB(usbblaster_ftd2xx)
_URJ_USB(cubic_cyclonium_ftd2xx)
_URJ_USB(nios_eval_ftd2xx)
_URJ_USB(usb_jtag_ftd2xx)
#endif
#ifdef ENABLE_LOWLEVEL_FTDI
_URJ_USB(usbblaster_ftdi)
_URJ_USB(cubic_cyclonium_ftdi)
_URJ_USB(nios_eval_ftdi)
_URJ_USB(usb_jtag_ftdi)
#endif
#endif
#undef _URJ_USB
Loading…
Cancel
Save