]> git.sur5r.net Git - openocd/commitdiff
remote_bitbang_sysfsgpio: fix reset handling
authorAleksey Shargalin <myokaski@gmail.com>
Tue, 31 Oct 2017 13:56:01 +0000 (16:56 +0300)
committerTomas Vanek <vanekt@fbl.cz>
Sat, 13 Jan 2018 06:35:55 +0000 (06:35 +0000)
When both SRST and TRST asserted, 'u' is sent to remote bitbang.
Fix for correct handling of such a case

Change-Id: I2a93ff71f5bbae658e6c0c3649a9fbcca2c5a14b
Signed-off-by: Aleksey Shargalin <myokaski@gmail.com>
Reviewed-on: http://openocd.zylin.com/4283
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
contrib/remote_bitbang/remote_bitbang_sysfsgpio.c

index e59a1bdeb59a92461a313933bf1763ce0100ddc8..6641307030d911149a35a591388227424ab09fdf 100644 (file)
@@ -302,7 +302,7 @@ static void process_remote_protocol(void)
                        break;
                else if (c == 'b' || c == 'B') /* Blink */
                        continue;
-               else if (c >= 'r' && c <= 'r' + 2) { /* Reset */
+               else if (c >= 'r' && c <= 'r' + 3) { /* Reset */
                        char d = c - 'r';
                        sysfsgpio_reset(!!(d & 2),
                                        (d & 1));