unify parallel port drivers a bit

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1720 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 6696a91bc6
commit a721e14d8b

@ -71,6 +71,10 @@
src/tap/usbconn/libftd2xx.c, src/tap/usbconn/libftdi.c,
src/tap/usbconn/libusb.c: Unify the usb cable drivers.
* src/tap/parport.c, src/tap/parport.h, src/tap/parport_list.h,
src/tap/parport/direct.c, src/tap/parport/ppdev.c, src/tap/parport/ppi.c:
Unify the list of parallel port drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bit.c (cmd_bit_print_params): Fix strncat length handling.

@ -28,23 +28,11 @@
#include <urjtag/parport.h>
/* @@@@ RFHH move these to some .h file */
extern urj_parport_driver_t urj_tap_parport_direct_parport_driver;
extern urj_parport_driver_t urj_tap_parport_ppdev_parport_driver;
extern urj_parport_driver_t urj_tap_parport_ppi_parport_driver;
#include "parport.h"
urj_parport_driver_t *urj_tap_parport_drivers[] = {
#ifdef ENABLE_LOWLEVEL_DIRECT
&urj_tap_parport_direct_parport_driver,
#endif /* ENABLE_LOWLEVEL_DIRECT */
#ifdef ENABLE_LOWLEVEL_PPDEV
&urj_tap_parport_ppdev_parport_driver,
#endif /* ENABLE_LOWLEVEL_PPDEV */
#ifdef ENABLE_LOWLEVEL_PPI
&urj_tap_parport_ppi_parport_driver,
#endif /* ENABLE_LOWLEVEL_PPI */
#define _URJ_LIST(item) &urj_tap_parport_##item##_driver,
#include "parport_list.h"
NULL /* last must be NULL */
};

@ -0,0 +1,39 @@
/*
* $Id: buses.h 1711 2010-01-23 19:12:01Z vapier $
*
* 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.
*
*/
#ifndef URJ_CABLE_CABLE_H
#define URJ_CABLE_CABLE_H
#define _URJ_LIST(item) extern urj_parport_driver_t urj_tap_parport_##item##_driver;
#include "parport_list.h"
typedef struct port_node_t port_node_t;
struct port_node_t
{
urj_parport_t *port;
port_node_t *next;
};
#endif /* URJ_CABLE_CABLE_H */

@ -37,6 +37,7 @@
#include <urjtag/log.h>
#include <urjtag/parport.h>
#include <urjtag/cable.h>
#include "../parport.h"
#if defined(HAVE_INPOUTXX)
@ -111,16 +112,6 @@ outb (unsigned char value, unsigned short int port)
}
#endif /* HAVE_I386_SET_IOPERM */
urj_parport_driver_t urj_tap_parport_direct_parport_driver;
typedef struct port_node_t port_node_t;
struct port_node_t
{
urj_parport_t *port;
port_node_t *next;
};
static port_node_t *ports = NULL; /* direct parallel ports */
typedef struct

@ -44,16 +44,7 @@
#include <urjtag/log.h>
#include <urjtag/parport.h>
#include <urjtag/cable.h>
urj_parport_driver_t urj_tap_parport_ppdev_parport_driver;
typedef struct port_node_t port_node_t;
struct port_node_t
{
urj_parport_t *port;
port_node_t *next;
};
#include "../parport.h"
static port_node_t *ports = NULL; /* ppdev parallel ports */

@ -40,16 +40,7 @@
#include <urjtag/log.h>
#include <urjtag/parport.h>
#include <urjtag/cable.h>
urj_parport_driver_t urj_tap_parport_ppi_parport_driver;
typedef struct port_node_t port_node_t;
struct port_node_t
{
urj_parport_t *port;
port_node_t *next;
};
#include "../parport.h"
static port_node_t *ports = NULL; /* ppi parallel ports */

@ -0,0 +1,37 @@
/*
* $Id: buses.h 1687 2009-12-29 23:53:09Z arniml $
*
* 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_LOWLEVEL_DIRECT
_URJ_LIST(direct_parport)
#endif
#ifdef ENABLE_LOWLEVEL_PPDEV
_URJ_LIST(ppdev_parport)
#endif
#ifdef ENABLE_LOWLEVEL_PPI
_URJ_LIST(ppi_parport)
#endif
#undef _URJ_LIST
Loading…
Cancel
Save