X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Fparport.c;h=714cb1daadaed537db148139512bba38b0c55e39;hp=1d7fcc44d77ea2267018e51308fb7d3a46a69771;hb=679dcd0b52f6bafe848eb48e714764d37a101bb5;hpb=08ee7bb982b16742f52cfdc6c649d82ffa2eb177 diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c index 1d7fcc44d7..714cb1daad 100644 --- a/src/jtag/drivers/parport.c +++ b/src/jtag/drivers/parport.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#include #include #include "bitbang.h" @@ -473,9 +474,9 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command) return ERROR_OK; } -static const struct command_registration parport_command_handlers[] = { +static const struct command_registration parport_subcommand_handlers[] = { { - .name = "parport_port", + .name = "port", .handler = parport_handle_parport_port_command, .mode = COMMAND_CONFIG, .help = "Display the address of the I/O port (e.g. 0x378) " @@ -484,7 +485,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "[port_number]", }, { - .name = "parport_cable", + .name = "cable", .handler = parport_handle_parport_cable_command, .mode = COMMAND_CONFIG, .help = "Set the layout of the parallel port cable " @@ -493,7 +494,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "[layout]", }, { - .name = "parport_write_on_exit", + .name = "write_on_exit", .handler = parport_handle_write_on_exit_command, .mode = COMMAND_CONFIG, .help = "Configure the parallel driver to write " @@ -501,7 +502,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "('on'|'off')", }, { - .name = "parport_toggling_time", + .name = "toggling_time", .handler = parport_handle_parport_toggling_time_command, .mode = COMMAND_CONFIG, .help = "Displays or assigns how many nanoseconds it " @@ -511,6 +512,17 @@ static const struct command_registration parport_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration parport_command_handlers[] = { + { + .name = "parport", + .mode = COMMAND_ANY, + .help = "perform parport management", + .chain = parport_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static struct jtag_interface parport_interface = { .supported = DEBUG_CAP_TMS_SEQ, .execute_queue = bitbang_execute_queue,