From: OpenOCD-Gerrit <ope...@us...> - 2020-06-06 17:03:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 2d3bbcd56656b5f2a708541d42c6c85371323730 (commit) from cdb6918c87569e055e56db88b2726538c4617ad6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2d3bbcd56656b5f2a708541d42c6c85371323730 Author: Tarek BOCHKATI <tar...@gm...> Date: Sun May 31 11:46:56 2020 +0100 arm_adi_v5: dap_ti_be_32_quirks_command minor simplification use handle_command_parse_bool within dap_ti_be_32_quirks_command to make it shorter and simpler. Change-Id: Ice179cc477933b27e27235dc2ade23fe655e233d Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: http://openocd.zylin.com/5708 Tested-by: jenkins Reviewed-by: Marc Schink <de...@za...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 5f6f1ff38..f19514c85 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -1878,24 +1878,8 @@ COMMAND_HANDLER(dap_dpreg_command) COMMAND_HANDLER(dap_ti_be_32_quirks_command) { struct adiv5_dap *dap = adiv5_get_dap(CMD_DATA); - uint32_t enable = dap->ti_be_32_quirks; - - switch (CMD_ARGC) { - case 0: - break; - case 1: - COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], enable); - if (enable > 1) - return ERROR_COMMAND_ARGUMENT_INVALID; - break; - default: - return ERROR_COMMAND_SYNTAX_ERROR; - } - dap->ti_be_32_quirks = enable; - command_print(CMD, "TI BE-32 quirks mode %s", - enable ? "enabled" : "disabled"); - - return 0; + return CALL_COMMAND_HANDLER(handle_command_parse_bool, &dap->ti_be_32_quirks, + "TI BE-32 quirks mode"); } const struct command_registration dap_instance_commands[] = { ----------------------------------------------------------------------- Summary of changes: src/target/arm_adi_v5.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) hooks/post-receive -- Main OpenOCD repository |