jtag/vdebug: using tap_state 22/7722/2
authorJacek Wuwer <jacekmw8@gmail.com>
Mon, 29 May 2023 16:38:44 +0000 (18:38 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 2 Jun 2023 21:04:17 +0000 (21:04 +0000)
This change implements the predefined type tap_state instead of generic
uint8_t in the driver

Change-Id: I3478e8d7b40b961f3ba77711179016cdcc35cd32
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7722
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
src/jtag/drivers/vdebug.c

index 4187c9876bbfef19d9ce7f46fd200a516be68269..f6d99c6c1c06acbce251a798504cd42bbcff5063 100644 (file)
@@ -53,7 +53,7 @@
 #include "helper/log.h"
 #include "helper/list.h"
 
-#define VD_VERSION 44
+#define VD_VERSION 46
 #define VD_BUFFER_LEN 4024
 #define VD_CHEADER_LEN 24
 #define VD_SHEADER_LEN 16
@@ -942,10 +942,10 @@ static int vdebug_jtag_tlr(tap_state_t state, uint8_t f_flush)
 {
        int rc = ERROR_OK;
 
-       uint8_t cur = tap_get_state();
+       tap_state_t cur = tap_get_state();
        uint8_t tms_pre = tap_get_tms_path(cur, state);
        uint8_t num_pre = tap_get_tms_path_len(cur, state);
-       LOG_INFO("tlr  from %" PRIx8 " to %" PRIx8, cur, state);
+       LOG_INFO("tlr  from %x to %x", cur, state);
        if (cur != state) {
                rc = vdebug_jtag_shift_tap(vdc.hsocket, pbuf, num_pre, tms_pre, 0, NULL, 0, 0, NULL, f_flush);
                tap_set_state(state);
@@ -958,7 +958,7 @@ static int vdebug_jtag_scan(struct scan_command *cmd, uint8_t f_flush)
 {
        int rc = ERROR_OK;
 
-       uint8_t cur = tap_get_state();
+       tap_state_t cur = tap_get_state();
        uint8_t state = cmd->ir_scan ? TAP_IRSHIFT : TAP_DRSHIFT;
        uint8_t tms_pre = tap_get_tms_path(cur, state);
        uint8_t num_pre = tap_get_tms_path_len(cur, state);
@@ -988,7 +988,7 @@ static int vdebug_jtag_scan(struct scan_command *cmd, uint8_t f_flush)
 
 static int vdebug_jtag_runtest(int cycles, tap_state_t state, uint8_t f_flush)
 {
-       uint8_t cur = tap_get_state();
+       tap_state_t cur = tap_get_state();
        uint8_t tms_pre = tap_get_tms_path(cur, state);
        uint8_t num_pre = tap_get_tms_path_len(cur, state);
        LOG_DEBUG("idle len:%d state cur:%x end:%x", cycles, cur, state);

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)