commands doc corrections.

Added a "script" directory for examples.
This commit is contained in:
François Dausseur
2025-02-18 15:40:58 +01:00
parent 5dfe5b123e
commit 9e0ca10a71
3 changed files with 18 additions and 16 deletions

View File

@@ -1129,7 +1129,7 @@ static int cmd_pause(script_ctx *ctx, char *line)
const char *cmd_help_help[] = {
"<command>(string)",
"if no args, it prints the list of commandsm,",
"if no args, it prints the list of commands,",
"otherwise the help of the <command>.",
""};
static int cmd_help(script_ctx *ctx, char *line)
@@ -1192,7 +1192,8 @@ static int cmd_help(script_ctx *ctx, char *line)
const char *cmd_call_help[] = {
"<path>(string)",
"Executes a script located at <path>.",
""};
""
};
static int cmd_call(script_ctx *ctx, char *line)
{
int offs;
@@ -1719,6 +1720,7 @@ static int cmd_print_devs_list(script_ctx *ctx, char *line)
ctx->script_printf(ctx, MSG_INFO_0, "%s\n", ptr);
free(ptr);
}
return JTAG_CORE_NO_ERROR;
}
return JTAG_CORE_NOT_FOUND;
@@ -1792,9 +1794,8 @@ static int cmd_open_probe(script_ctx *ctx, char *line)
}
const char *cmd_load_bsdl_help[] = {
"", // Arguments "1<arg>(type) ..."
"explanations line one", // Explanations
"explanations line two",
"<file>(string) <device>(int)",
"Load/attach a bsdl file to a device into the chain.",
""
};
static int cmd_load_bsdl(script_ctx *ctx, char *line)
@@ -1829,9 +1830,9 @@ static int cmd_load_bsdl(script_ctx *ctx, char *line)
}
const char *cmd_set_scan_mode_help[] = {
"", // Arguments "1<arg>(type) ..."
"explanations line one", // Explanations
"explanations line two",
"<device>(int) <mode>(string)",
"Set the scan mode for a particular device.",
"mode to be chosen in EXTEST or SAMPLE",
""
};
static int cmd_set_scan_mode(script_ctx *ctx, char *line)
@@ -1904,8 +1905,8 @@ static int cmd_push_and_pop(script_ctx *ctx, char *line)
}
const char *cmd_set_pin_mode_help[] = {
"<device>(int) <pin>(string) <mode>(string)",
"Change the mode (input or output) of the pin of the given device.",
"<device>(int) <pin>(string) <mode>(int)",
"Change the mode (input: 0 or output: 1) of the pin of the given device.",
""
};
static int cmd_set_pin_mode(script_ctx *ctx, char *line)
@@ -1990,7 +1991,7 @@ static int cmd_set_pin_state(script_ctx *ctx, char *line)
}
const char *cmd_get_pin_state_help[] = {
"<device>(int) <pin>(string) <mode>(string)",
"<device>(int) <pin>(string)",
"Gets the state (0 or 1) of the pin of the given device.",
"The mode is to be chosen between 'input' or 'output'.",
""
@@ -2000,14 +2001,12 @@ static int cmd_get_pin_state(script_ctx *ctx, char *line)
int i, j, k, ret, id;
char dev_index[DEFAULT_BUFLEN];
char pinname[DEFAULT_BUFLEN];
char mode[DEFAULT_BUFLEN];
jtag_core *jc;
jc = (jtag_core *)ctx->app_ctx;
i = get_param(ctx, line, 1, dev_index);
j = get_param(ctx, line, 2, pinname);
k = get_param(ctx, line, 3, mode);
if (i >= 0 && j >= 0 && k >= 0)
{
@@ -2660,9 +2659,8 @@ static int cmd_spi_rd_wr(script_ctx *ctx, char *line)
}
const char *cmd_get_pins_list_help[] = {
"", // Arguments "1<arg>(type) ..."
"explanations line one", // Explanations
"explanations line two",
"<device>(int)",
"Lists the device pins and their properties",
""
};
static int cmd_get_pins_list(script_ctx *ctx, char *line)