Skip to content
Snippets Groups Projects
Commit e873a6d2 authored by oharboe's avatar oharboe
Browse files

check syntax for init/version

git-svn-id: svn://svn.berlios.de/openocd/trunk@1257 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 3160f4a4
No related branches found
No related tags found
No related merge requests found
...@@ -355,7 +355,7 @@ int zy1000_register_commands(struct command_context_s *cmd_ctx) ...@@ -355,7 +355,7 @@ int zy1000_register_commands(struct command_context_s *cmd_ctx)
int zy1000_init(void) int zy1000_init(void)
{ {
LOG_ERROR("%s\n", ZYLIN_OPENOCD_VERSION); LOG_USER("%s", ZYLIN_OPENOCD_VERSION);
ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x30); // Turn on LED1 & LED2 ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x30); // Turn on LED1 & LED2
......
...@@ -82,6 +82,9 @@ void print_version(void) ...@@ -82,6 +82,9 @@ void print_version(void)
/* Give TELNET a way to find out what version this is */ /* Give TELNET a way to find out what version this is */
int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{ {
if (argc!=0)
return ERROR_COMMAND_SYNTAX_ERROR;
command_print(cmd_ctx, OPENOCD_VERSION); command_print(cmd_ctx, OPENOCD_VERSION);
return ERROR_OK; return ERROR_OK;
...@@ -123,6 +126,10 @@ int ioutil_init(struct command_context_s *cmd_ctx); ...@@ -123,6 +126,10 @@ int ioutil_init(struct command_context_s *cmd_ctx);
/* OpenOCD can't really handle failure of this command. Patches welcome! :-) */ /* OpenOCD can't really handle failure of this command. Patches welcome! :-) */
int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{ {
if (argc!=0)
return ERROR_COMMAND_SYNTAX_ERROR;
int retval; int retval;
static int initialized=0; static int initialized=0;
if (initialized) if (initialized)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment