split out libusb help strings so sub-libusb drivers can share them

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1806 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 2bb5f3c51d
commit 88d165e388

@ -6,6 +6,11 @@
* src/tap/cable/usbblaster.c: Convert from libftdx helpers to libusb helpers.
* src/tap/cable/ice100.c: Drop local help stub and use common libusb one.
* src/tap/cable/generic_usbconn.h: Split help text out so sub-libusb drivers
can avoid manual string duplication.
* src/tap/cable/generic_usbconn.c: Use new libusb help string defines.
* src/tap/cable/ft2232.c: Likewise.
2010-06-24 Mike Frysinger <vapier@gentoo.org>

@ -1944,12 +1944,14 @@ ft2232_usbcable_help (urj_log_level_t ll, const char *cablename)
found:
urj_log (ll,
_("Usage: cable %s [vid=VID] [pid=PID] [desc=DESC] [driver=DRIVER]\n"
"\n" "VID vendor ID (hex), defaults to %04X\n"
"PID product ID (hex), defaults to %04X\n"
"DESC Some string to match in description or serial no.\n"
_("Usage: cable %s %s [driver=DRIVER]\n"
"\n" "%s"
"DRIVER usbconn driver, either ftdi-mpsse or ftd2xx-mpsse\n"
" defaults to %s if not specified\n" "\n"), cablename,
"\n"
"Default: vid=%x pid=%x driver=%s\n"
"\n"),
cablename, URJ_TAP_CABLE_GENERIC_USBCONN_HELP_SHORT,
URJ_TAP_CABLE_GENERIC_USBCONN_HELP_DESC,
conn->vid, conn->pid, DEFAULT_DRIVER);
}

@ -166,12 +166,10 @@ void
urj_tap_cable_generic_usbconn_help (urj_log_level_t ll, const char *cablename)
{
urj_log (ll,
_("Usage: cable %s [vid=VID] [pid=PID] [desc=DESC] [...]\n"
"\n"
"VID USB Device Vendor ID (hex, e.g. 0abc)\n"
"PID USB Device Product ID (hex, e.g. 0abc)\n"
"DESC Some string to match in description or serial no.\n"
"\n"), cablename);
_("Usage: cable %s %s\n" "\n%s\n"),
cablename,
URJ_TAP_CABLE_GENERIC_USBCONN_HELP_SHORT,
URJ_TAP_CABLE_GENERIC_USBCONN_HELP_DESC);
}
int

@ -37,9 +37,16 @@
int urj_tap_cable_generic_usbconn_connect (urj_cable_t *cable,
const urj_param_t *params[]);
void urj_tap_cable_generic_usbconn_done (urj_cable_t *cable);
void urj_tap_cable_generic_usbconn_help (urj_log_level_t ll, const char *name);
void urj_tap_cable_generic_usbconn_free (urj_cable_t *cable);
void urj_tap_cable_generic_usbconn_help (urj_log_level_t ll, const char *name);
#define URJ_TAP_CABLE_GENERIC_USBCONN_HELP_SHORT \
"[vid=VID] [pid=PID] [desc=DESC]"
#define URJ_TAP_CABLE_GENERIC_USBCONN_HELP_DESC \
"VID USB Device Vendor ID (hex, e.g. 0abc)\n" \
"PID USB Device Product ID (hex, e.g. 0abc)\n" \
"DESC Some string to match in description or serial no.\n"
#define URJ_DECLARE_USBCONN_CABLE(vid, pid, driver, name, cable) \
const urj_usbconn_cable_t urj_tap_cable_usbconn_##cable = { name, NULL, driver, vid, pid };

Loading…
Cancel
Save