cur_cable = cables;
- if (parport_cable == NULL) {
+ if (!parport_cable) {
parport_cable = strdup("wiggler");
LOG_WARNING("No parport cable specified, using default 'wiggler'");
}
uint32_t ns;
int retval = parse_u32(CMD_ARGV[0], &ns);
- if (ERROR_OK != retval)
+ if (retval != ERROR_OK)
return retval;
if (ns == 0) {
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) "
.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 "
.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 "
.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 "
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,