constify the parallel port and usb cable drivers

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

@ -59,7 +59,7 @@
* src/tap/cable/ft2232.c, src/tap/cable/generic_usbconn.c,
src/tap/cable/generic_usbconn.h, src/tap/cable/jlink.c,
src/tap/cable/usbblaster.c, src/tap/cable/xpc.c: Constify the usb cable
drivers.
sub drivers.
* src/tap/cable/ft2232.c, src/tap/cable/generic_usbconn.h,
src/tap/cable/jlink.c, src/tap/cable/usbblaster.c, src/tap/cable/xpc.c,
@ -73,7 +73,15 @@
* 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.
Unify the list of parallel port cable drivers.
* include/urjtag/parport.h, src/tap/parport.c, src/tap/parport/direct.c,
src/tap/parport.h, src/tap/parport/ppdev.c, src/tap/parport/ppi.c:
Constify the parallel port cable drivers.
* include/urjtag/usbconn.h, src/tap/usbconn.c, src/tap/usbconn.h,
src/tap/usbconn/libftd2xx.c, src/tap/usbconn/libftdi.c,
src/tap/usbconn/libusb.c: Constify the USB cable drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>

@ -62,7 +62,7 @@ urj_parport_driver_t;
struct URJ_PARPORT
{
urj_parport_driver_t *driver;
const urj_parport_driver_t *driver;
void *params;
urj_cable_t *cable;
};
@ -78,6 +78,6 @@ int urj_tap_parport_set_control (urj_parport_t *port, const unsigned char data);
const char *urj_cable_parport_devtype_string(urj_cable_parport_devtype_t dt);
extern urj_parport_driver_t *urj_tap_parport_drivers[];
extern const urj_parport_driver_t *urj_tap_parport_drivers[];
#endif /* URJ_PARPORT_H */

@ -60,7 +60,7 @@ urj_usbconn_driver_t;
struct URJ_USBCONN
{
urj_usbconn_driver_t *driver;
const urj_usbconn_driver_t *driver;
void *params;
urj_cable_t *cable;
};
@ -73,6 +73,6 @@ int urj_tap_usbconn_close (urj_usbconn_t *conn);
int urj_tap_usbconn_read (urj_usbconn_t *conn, uint8_t *buf, int len);
int urj_tap_usbconn_write (urj_usbconn_t *conn, uint8_t *buf, int len,
int recv);
extern urj_usbconn_driver_t *urj_tap_usbconn_drivers[];
extern const urj_usbconn_driver_t *urj_tap_usbconn_drivers[];
#endif /* URJ_USBCONN_H */

@ -30,7 +30,7 @@
#include "parport.h"
urj_parport_driver_t *urj_tap_parport_drivers[] = {
const urj_parport_driver_t *urj_tap_parport_drivers[] = {
#define _URJ_LIST(item) &urj_tap_parport_##item##_driver,
#include "parport_list.h"
NULL /* last must be NULL */

@ -25,7 +25,7 @@
#ifndef URJ_CABLE_CABLE_H
#define URJ_CABLE_CABLE_H
#define _URJ_LIST(item) extern urj_parport_driver_t urj_tap_parport_##item##_driver;
#define _URJ_LIST(item) extern const urj_parport_driver_t urj_tap_parport_##item##_driver;
#include "parport_list.h"
typedef struct port_node_t port_node_t;

@ -305,7 +305,7 @@ direct_set_control (urj_parport_t *parport, unsigned char data)
return URJ_STATUS_OK;
}
urj_parport_driver_t urj_tap_parport_direct_parport_driver = {
const urj_parport_driver_t urj_tap_parport_direct_parport_driver = {
URJ_CABLE_PARPORT_DEV_PARALLEL,
direct_connect,
direct_parport_free,

@ -241,7 +241,7 @@ ppdev_set_control (urj_parport_t *parport, unsigned char data)
return URJ_STATUS_OK;
}
urj_parport_driver_t urj_tap_parport_ppdev_parport_driver = {
const urj_parport_driver_t urj_tap_parport_ppdev_parport_driver = {
URJ_CABLE_PARPORT_DEV_PPDEV,
ppdev_connect,
ppdev_parport_free,

@ -227,7 +227,7 @@ ppi_set_control (urj_parport_t *parport, unsigned char data)
return URJ_STATUS_OK;
}
urj_parport_driver_t urj_tap_parport_ppi_parport_driver = {
const urj_parport_driver_t urj_tap_parport_ppi_parport_driver = {
URJ_CABLE_PARPORT_DEV_PPI,
ppi_connect,
ppi_parport_free,

@ -31,7 +31,7 @@
#include "usbconn.h"
urj_usbconn_driver_t *urj_tap_usbconn_drivers[] = {
const urj_usbconn_driver_t *urj_tap_usbconn_drivers[] = {
#define _URJ_LIST(item) &urj_tap_usbconn_##item##_driver,
#include "usbconn_list.h"
NULL /* last must be NULL */

@ -25,7 +25,7 @@
#ifndef URJ_CABLE_USBCONN_H
#define URJ_CABLE_USBCONN_H
#define _URJ_LIST(item) extern urj_usbconn_driver_t urj_tap_usbconn_##item##_driver;
#define _URJ_LIST(item) extern const urj_usbconn_driver_t urj_tap_usbconn_##item##_driver;
#include "usbconn_list.h"
#endif /* URJ_CABLE_USBCONN_H */

@ -603,7 +603,7 @@ urj_usbconn_driver_t urj_tap_usbconn_ftd2xx_driver = {
usbconn_ftd2xx_write
};
urj_usbconn_driver_t urj_tap_usbconn_ftd2xx_mpsse_driver = {
const urj_usbconn_driver_t urj_tap_usbconn_ftd2xx_mpsse_driver = {
"ftd2xx-mpsse",
usbconn_ftd2xx_mpsse_connect,
usbconn_ftd2xx_free,

@ -606,7 +606,7 @@ usbconn_ftdi_free (urj_usbconn_t *conn)
/* ---------------------------------------------------------------------- */
urj_usbconn_driver_t urj_tap_usbconn_ftdi_driver = {
const urj_usbconn_driver_t urj_tap_usbconn_ftdi_driver = {
"ftdi",
usbconn_ftdi_connect,
usbconn_ftdi_free,
@ -616,7 +616,7 @@ urj_usbconn_driver_t urj_tap_usbconn_ftdi_driver = {
usbconn_ftdi_write
};
urj_usbconn_driver_t urj_tap_usbconn_ftdi_mpsse_driver = {
const urj_usbconn_driver_t urj_tap_usbconn_ftdi_mpsse_driver = {
"ftdi-mpsse",
usbconn_ftdi_mpsse_connect,
usbconn_ftdi_free,

@ -255,7 +255,7 @@ usbconn_libusb_free (urj_usbconn_t *conn)
/* ---------------------------------------------------------------------- */
urj_usbconn_driver_t urj_tap_usbconn_libusb_driver = {
const urj_usbconn_driver_t urj_tap_usbconn_libusb_driver = {
"libusb",
usbconn_libusb_connect,
usbconn_libusb_free,

Loading…
Cancel
Save