projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use COMMAND_HANDLER macro to define all commands
[fw/openocd]
/
src
/
target
/
arm11.c
diff --git
a/src/target/arm11.c
b/src/target/arm11.c
index fe39d6e8800e241843dc7a902f3f8cf3fd9ddb60..098b0afa31c539916317c68fafe4133e92cb75dd 100644
(file)
--- a/
src/target/arm11.c
+++ b/
src/target/arm11.c
@@
-2028,7
+2028,7
@@
static int arm11_handle_bool(struct command_context_s *cmd_ctx,
}
#define BOOL_WRAPPER(name, print_name) \
}
#define BOOL_WRAPPER(name, print_name) \
-
static int arm11_handle_bool_##name(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
) \
+
COMMAND_HANDLER(arm11_handle_bool_##name
) \
{ \
return arm11_handle_bool(cmd_ctx, cmd, args, argc, &arm11_config_##name, print_name); \
}
{ \
return arm11_handle_bool(cmd_ctx, cmd, args, argc, &arm11_config_##name, print_name); \
}
@@
-2038,7
+2038,7
@@
BOOL_WRAPPER(memwrite_error_fatal, "fatal error mode for memory writes")
BOOL_WRAPPER(step_irq_enable, "IRQs while stepping")
BOOL_WRAPPER(hardware_step, "hardware single step")
BOOL_WRAPPER(step_irq_enable, "IRQs while stepping")
BOOL_WRAPPER(hardware_step, "hardware single step")
-
static int arm11_handle_vcr(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
+
COMMAND_HANDLER(arm11_handle_vcr
)
{
switch (argc) {
case 0:
{
switch (argc) {
case 0:
@@
-2185,17
+2185,16
@@
static int arm11_handle_etm_read_write(struct command_context_s *cmd_ctx, char *
return ERROR_OK;
}
return ERROR_OK;
}
-
int arm11_handle_etmr(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
+
COMMAND_HANDLER(arm11_handle_etmr
)
{
return arm11_handle_etm_read_write(cmd_ctx, cmd, args, argc, true);
}
{
return arm11_handle_etm_read_write(cmd_ctx, cmd, args, argc, true);
}
-
int arm11_handle_etmw(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc
)
+
COMMAND_HANDLER(arm11_handle_etmw
)
{
return arm11_handle_etm_read_write(cmd_ctx, cmd, args, argc, false);
}
{
return arm11_handle_etm_read_write(cmd_ctx, cmd, args, argc, false);
}
-
#define ARM11_HANDLER(x) .x = arm11_##x
target_type_t arm11_target = {
#define ARM11_HANDLER(x) .x = arm11_##x
target_type_t arm11_target = {