X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fjtag%2Fat91rm9200.c;h=024dd6d7ea25a78d50c7bd64291247b5e822f162;hb=833e7f5248778bcb31b4db1a1b91160995415203;hp=52869a3e53efb42a6786aa840a84bc6fc2f30974;hpb=bee796b5b07a0f83ed0ad2360bad70d8409e1109;p=fw%2Fopenocd diff --git a/src/jtag/at91rm9200.c b/src/jtag/at91rm9200.c index 52869a3e5..024dd6d7e 100644 --- a/src/jtag/at91rm9200.c +++ b/src/jtag/at91rm9200.c @@ -118,11 +118,11 @@ static void at91rm9200_write(int tck, int tms, int tdi); static void at91rm9200_reset(int trst, int srst); static int at91rm9200_speed(int speed); -static int at91rm9200_register_commands(struct command_context_s *cmd_ctx); +static int at91rm9200_register_commands(struct command_context *cmd_ctx); static int at91rm9200_init(void); static int at91rm9200_quit(void); -jtag_interface_t at91rm9200_interface = +struct jtag_interface at91rm9200_interface = { .name = "at91rm9200", @@ -185,24 +185,24 @@ static int at91rm9200_speed(int speed) return ERROR_OK; } -static int at91rm9200_handle_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int at91rm9200_handle_device_command(struct command_context *cmd_ctx, char *cmd, char **CMD_ARGV, int argc) { - if (argc == 0) + if (CMD_ARGC == 0) return ERROR_OK; /* only if the device name wasn't overwritten by cmdline */ if (at91rm9200_device == 0) { - at91rm9200_device = malloc(strlen(args[0]) + sizeof(char)); - strcpy(at91rm9200_device, args[0]); + at91rm9200_device = malloc(strlen(CMD_ARGV[0]) + sizeof(char)); + strcpy(at91rm9200_device, CMD_ARGV[0]); } return ERROR_OK; } -static int at91rm9200_register_commands(struct command_context_s *cmd_ctx) +static int at91rm9200_register_commands(struct command_context *cmd_ctx) { - register_command(cmd_ctx, NULL, "at91rm9200_device", at91rm9200_handle_device_command, + COMMAND_REGISTER(cmd_ctx, NULL, "at91rm9200_device", at91rm9200_handle_device_command, COMMAND_CONFIG, NULL); return ERROR_OK; }