This is an automated email from Gerrit.

larytet (lary...@yahoo.com) just uploaded a new patch set to Gerrit, which you 
can find at http://openocd.zylin.com/1443

-- gerrit

commit 77e74d04156bd9bdfd7b5f961e19676c1b423ec9
Author: larytet <lary...@yahoo.com>
Date:   Thu Jun 13 11:32:07 2013 +0300

    Add support for ST-LINK v2 in stlink_usb_error_check()
    
    The current code returns with error when ST-LINK v2 is connected
    
    Change-Id: I86a1d30bd7a1d07f42db3fa562b622d2ad76fa3c
    Signed-off-by: Larytet <lary...@yahoo.com>

diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index e282202..5caa612 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -358,8 +358,12 @@ static int stlink_usb_error_check(void *handle)
        h = (struct stlink_usb_handle_s *)handle;
 
        /* TODO: no error checking yet on api V1 */
-       if (h->jtag_api == STLINK_JTAG_API_V1)
-               h->databuf[0] = STLINK_DEBUG_ERR_OK;
+       switch (h->jtag_api) {
+               case STLINK_JTAG_API_V1:
+               case STLINK_JTAG_API_V2:
+                       h->databuf[0] = STLINK_DEBUG_ERR_OK;
+                       break;
+       }
 
        switch (h->databuf[0]) {
                case STLINK_DEBUG_ERR_OK:

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to