This is an automated email from Gerrit. Mathias Küster ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1760
-- gerrit commit dbe40d1b8eefc25b088ea0d2aedc21c844f461d5 Author: Mathias K <[email protected]> Date: Thu Oct 24 14:03:03 2013 +0200 stlink: rename stlink_api command Rename stlink_api command to hla_api and move the value check to the stlink interface. Change-Id: I8f7885d3756fec462f9ebbee2ed285a98a51366c Signed-off-by: Mathias K <[email protected]> diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 31f08cb..446392b 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -1724,9 +1724,13 @@ static int stlink_usb_open(struct hl_interface_param_s *param, void **fd) /* check that user has not requested certain api version * and if they have check it is supported */ - if ((param->api != 0) && (param->api <= h->version.jtag_api_max)) { - api = param->api; - LOG_INFO("using stlink api v%d", api); + if (param->api != 0) { + if (param->api <= h->version.jtag_api_max) { + api = param->api; + LOG_INFO("using stlink api v%d", api); + } else + LOG_INFO("api v%d not supported, fallback to stlink api v%d", + param->api, api); } /* set the used jtag api, this will default to the newest supported version */ diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index 00e4549..22afc4f 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -211,15 +211,13 @@ COMMAND_HANDLER(hl_interface_handle_vid_pid_command) return ERROR_OK; } -COMMAND_HANDLER(stlink_interface_handle_api_command) +COMMAND_HANDLER(interface_handle_api_command) { if (CMD_ARGC != 1) return ERROR_COMMAND_SYNTAX_ERROR; unsigned new_api; COMMAND_PARSE_NUMBER(uint, CMD_ARGV[0], new_api); - if ((new_api == 0) || (new_api > 2)) - return ERROR_COMMAND_SYNTAX_ERROR; hl_if.param.api = new_api; @@ -280,11 +278,11 @@ static const struct command_registration hl_interface_command_handlers[] = { .usage = "(vid pid)* ", }, { - .name = "stlink_api", - .handler = &stlink_interface_handle_api_command, + .name = "hla_api", + .handler = &interface_handle_api_command, .mode = COMMAND_CONFIG, - .help = "set the desired stlink api level", - .usage = "api version 1 or 2", + .help = "set the desired api level", + .usage = "api version supported by the adapter", }, { .name = "trace", -- ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
