]> git.sur5r.net Git - openocd/commitdiff
stlink: default to latest api available
authorSpencer Oliver <spen@spen-soft.co.uk>
Thu, 19 Apr 2012 13:03:32 +0000 (14:03 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 30 Apr 2012 13:04:07 +0000 (13:04 +0000)
Change-Id: Ic04128f4020055587bb87250f41e5c804d9c2b01
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/577
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/jtag/drivers/stlink_usb.c

index 68179c39b4e35cbe0254730dcc860551a6e1d21c..6fe958e84e5c79c9a0278a946e87c521a2cc96ae 100644 (file)
@@ -1186,8 +1186,8 @@ static int stlink_usb_open(struct stlink_interface_param_s *param, void **fd)
                return err;
        }
 
-       /* set the used jtag api */
-       h->jtag_api = STLINK_JTAG_API_V1;
+       /* set the used jtag api, this will default to the newest supported version */
+       h->jtag_api = h->version.jtag_api_max;
 
        /* initialize the debug hardware */
        err = stlink_usb_init_mode(h);