]> git.sur5r.net Git - openocd/commitdiff
- swap processing of reset handling. First srst and than trst.
authormifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 24 May 2008 11:33:34 +0000 (11:33 +0000)
committermifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 24 May 2008 11:33:34 +0000 (11:33 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@680 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jlink.c

index 190ada4603ebf921c075fcd81bbf636a888e0ec0..3d2468e1471be53d6d1daea4f906f13ebec060cc 100644 (file)
@@ -447,22 +447,22 @@ void jlink_reset(int trst, int srst)
        LOG_DEBUG("trst: %i, srst: %i", trst, srst);
        
        /* Signals are active low */
-       if (trst == 0)
+       if (srst == 0)
        {
-               jlink_simple_command(EMU_CMD_HW_TRST1);
+               jlink_simple_command(EMU_CMD_HW_RESET1);
        }
-       else if (trst == 1)
+       else if (srst == 1)
        {
-               jlink_simple_command(EMU_CMD_HW_TRST0);
+               jlink_simple_command(EMU_CMD_HW_RESET0);
        }
        
-       if (srst == 0)
+       if (trst == 0)
        {
-               jlink_simple_command(EMU_CMD_HW_RESET1);
+               jlink_simple_command(EMU_CMD_HW_TRST1);
        }
-       else if (srst == 1)
+       else if (trst == 1)
        {
-               jlink_simple_command(EMU_CMD_HW_RESET0);
+               jlink_simple_command(EMU_CMD_HW_TRST0);
        }
 }