added query of reset speed

git-svn-id: svn://svn.berlios.de/openocd/trunk@538 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2008-04-04 07:43:04 +00:00
parent 32cc2202f0
commit 7abe97565e
1 changed files with 18 additions and 13 deletions

View File

@ -1733,6 +1733,9 @@ int handle_jtag_ntrst_delay_command(struct command_context_s *cmd_ctx, char *cmd
int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{ {
int cur_speed = 0; int cur_speed = 0;
if (argc != 0)
{
if ((argc<1) || (argc>2)) if ((argc<1) || (argc>2))
return ERROR_COMMAND_SYNTAX_ERROR; return ERROR_COMMAND_SYNTAX_ERROR;
@ -1747,6 +1750,8 @@ int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char
* in which case jtag isn't initialized */ * in which case jtag isn't initialized */
if (jtag) if (jtag)
jtag->speed(cur_speed); jtag->speed(cur_speed);
}
command_print(cmd_ctx, "jtag_speed: %d, %d", jtag_speed, jtag_speed_post_reset);
return ERROR_OK; return ERROR_OK;
} }