}
/* Give TELNET a way to find out what version this is */
-static int handle_version_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(handle_version_command)
{
if (argc != 0)
return ERROR_COMMAND_SYNTAX_ERROR;
jtag_interface_quit();
}
-static int log_target_callback_event_handler(struct target_s *target, enum target_event event, void *priv)
+static int log_target_callback_event_handler(struct target *target, enum target_event event, void *priv)
{
switch (event)
{
int ioutil_init(struct command_context_s *cmd_ctx);
/* OpenOCD can't really handle failure of this command. Patches welcome! :-) */
-static int handle_init_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(handle_init_command)
{
if (argc != 0)
command_context_t *global_cmd_ctx;
+/// src/hello.c gives a simple example for writing new command modules
+int hello_register_commands(struct command_context_s *cmd_ctx);
+
/* NB! this fn can be invoked outside this file for non PC hosted builds */
command_context_t *setup_command_handler(void)
{
COMMAND_EXEC, "show OpenOCD version");
/* register subsystem commands */
+ hello_register_commands(cmd_ctx);
server_register_commands(cmd_ctx);
telnet_register_commands(cmd_ctx);
gdb_register_commands(cmd_ctx);