drivers/bitbang: blink LED on SWD 71/5771/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 4 Apr 2020 17:47:09 +0000 (19:47 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 26 Jul 2020 19:15:42 +0000 (20:15 +0100)
The blinking was implemented for JTAG only.

Extend it to SWD.
There is no error check on SWD exchange. Add a FIXME for further
fix.

Change-Id: I42a6708c54b1eefaf691e0fe09ca58c42b2764fd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5771
Tested-by: jenkins
src/jtag/drivers/bitbang.c

index 4417e1258f03decb1bd6fc431dae2d6cc6e5b62f..2a78fa248e908d5074d831ed09d145dcaf2f2f33 100644 (file)
@@ -394,6 +394,11 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u
 {
        LOG_DEBUG("bitbang_swd_exchange");
 
+       if (bitbang_interface->blink) {
+               /* FIXME: we should manage errors */
+               bitbang_interface->blink(1);
+       }
+
        for (unsigned int i = offset; i < bit_cnt + offset; i++) {
                int bytec = i/8;
                int bcval = 1 << (i % 8);
@@ -410,6 +415,11 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u
 
                bitbang_interface->swd_write(1, swdio);
        }
+
+       if (bitbang_interface->blink) {
+               /* FIXME: we should manage errors */
+               bitbang_interface->blink(0);
+       }
 }
 
 static int bitbang_swd_switch_seq(enum swd_special_seq seq)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)