hosted/ftdi: Allow to list supported cables.
This commit is contained in:
parent
8a2bce26f2
commit
f4eed249eb
|
@ -280,6 +280,15 @@ void platform_init(int argc, char **argv)
|
|||
if (cl_opts.opt_device) {
|
||||
info.bmp_type = BMP_TYPE_BMP;
|
||||
} else if (cl_opts.opt_cable) {
|
||||
if ((!strcmp(cl_opts.opt_cable, "list")) ||
|
||||
(!strcmp(cl_opts.opt_cable, "l"))) {
|
||||
cable_desc_t *cable = &cable_desc[0];
|
||||
DEBUG_WARN("Available cables:\n");
|
||||
for (; cable->name; cable++) {
|
||||
DEBUG_WARN("\t%s\n", cable->name);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
/* check for libftdi devices*/
|
||||
res = ftdi_bmp_init(&cl_opts, &info);
|
||||
if (res)
|
||||
|
|
|
@ -129,6 +129,7 @@ static void cl_help(char **argv, BMP_CL_OPTIONS_t *opt)
|
|||
DEBUG_WARN("\t-s \"serial\"\t: Use dongle with (partial) "
|
||||
"serial number \"serial\"\n");
|
||||
DEBUG_WARN("\t-c \"string\"\t: Use ftdi dongle with type \"string\"\n");
|
||||
DEBUG_WARN("\t\t Use \"list\" to list available cables\n");
|
||||
DEBUG_WARN("Run mode related options:\n");
|
||||
DEBUG_WARN("\tDefault mode is to start the debug server at :2000\n");
|
||||
DEBUG_WARN("\t-j\t\t: Use JTAG. SWD is default.\n");
|
||||
|
|
Loading…
Reference in New Issue