unify the list of ftdi usb cable drivers

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

@ -53,6 +53,9 @@
* 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.
* src/tap/cable/ft2232.c, src/tap/cable/ft2232_list.h: Unify the list of
ftdi usb cable drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bit.c (cmd_bit_print_params): Fix strncat length handling.

@ -1819,17 +1819,8 @@ ft2232_cable_free (urj_cable_t *cable)
}
urj_usbconn_cable_t urj_tap_cable_usbconn_ft2232_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_armusbocd_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_gnice_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_gniceplus_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_jtagkey_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_oocdlinks_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_turtelizer2_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_usbtojtagif_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_signalyzer_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_flyswatter_ftdi;
urj_usbconn_cable_t urj_tap_cable_usbconn_usbscarab2_ftdi;
#define _URJ_FTDI(usb) urj_usbconn_cable_t urj_tap_cable_usbconn_##usb##_ftdi;
#include "ft2232_list.h"
static void
@ -1837,37 +1828,11 @@ ft2232_usbcable_help (urj_log_level_t ll, const char *cablename)
{
urj_usbconn_cable_t *conn;
conn = &urj_tap_cable_usbconn_armusbocd_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
#define _URJ_FTDI(usb) \
conn = &urj_tap_cable_usbconn_##usb##_ftdi; \
if (strcasecmp (conn->name, cablename) == 0) \
goto found;
conn = &urj_tap_cable_usbconn_gnice_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_gniceplus_ftdi;
if (strcasecmp( conn->name, cablename ) == 0)
goto found;
conn = &urj_tap_cable_usbconn_jtagkey_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_oocdlinks_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_turtelizer2_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_usbtojtagif_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_signalyzer_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_flyswatter_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_usbscarab2_ftdi;
if (strcasecmp (conn->name, cablename) == 0)
goto found;
conn = &urj_tap_cable_usbconn_ft2232_ftdi;
#include "ft2232_list.h"
found:
urj_log (ll,

@ -0,0 +1,41 @@
/*
* $Id: ft2232.c 1714 2010-01-23 20:07:41Z vapier $
*
* Generic cable driver for FTDI's FT2232C chip in MPSSE mode.
* Copyright (C) 2007 A. Laeuger
*
* 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 Arnim Laeuger, 2007-2008.
* Support for JTAGkey submitted by Laurent Gauch, 2008.
* Support for FT2232H written by Michael Hennerich, 2009; adapted
* for urjtag codebase and submitted by Adam Megacz, 2010.
*
*/
_URJ_FTDI(ft2232)
_URJ_FTDI(armusbocd)
_URJ_FTDI(gnice)
_URJ_FTDI(gniceplus)
_URJ_FTDI(jtagkey)
_URJ_FTDI(oocdlinks)
_URJ_FTDI(turtelizer2)
_URJ_FTDI(usbtojtagif)
_URJ_FTDI(signalyzer)
_URJ_FTDI(flyswatter)
_URJ_FTDI(usbscarab2)
#undef _URJ_FTDI
Loading…
Cancel
Save