Buspirate: fix shadow
[openocd.git] / src / jtag / drivers / buspirate.c
index 1c433a96dfe605f048ff70ab7461d976adc0ad3d..e5f8fb630fc46bd6a2cf258ab7a9170d2b5f8d6c 100644 (file)
@@ -633,24 +633,24 @@ static void buspirate_tap_make_space(int scans, int bits)
 
 static void buspirate_tap_append(int tms, int tdi)
 {
-       int index;
+       int chain_index;
 
        buspirate_tap_make_space(0, 1);
-       index = tap_chain_index / 8;
+       chain_index = tap_chain_index / 8;
 
-       if (index < BUSPIRATE_BUFFER_SIZE) {
+       if (chain_index < BUSPIRATE_BUFFER_SIZE) {
                int bit_index = tap_chain_index % 8;
                uint8_t bit = 1 << bit_index;
 
                if (tms)
-                       tms_chain[index] |= bit;
+                       tms_chain[chain_index] |= bit;
                else
-                       tms_chain[index] &= ~bit;
+                       tms_chain[chain_index] &= ~bit;
 
                if (tdi)
-                       tdi_chain[index] |= bit;
+                       tdi_chain[chain_index] |= bit;
                else
-                       tdi_chain[index] &= ~bit;
+                       tdi_chain[chain_index] &= ~bit;
 
                tap_chain_index++;
        } else
@@ -832,13 +832,13 @@ static void buspirate_jtag_get_adcs(int fd)
                ((float)c)/155.1515, ((float)d)/155.1515);
 }
 
-static unsigned char buspirate_jtag_command(int buspirate_fd,
+static unsigned char buspirate_jtag_command(int fd,
                char *cmd, int cmdlen)
 {
        int res;
        int len = 0;
 
-       res = buspirate_serial_write(buspirate_fd, cmd, cmdlen);
+       res = buspirate_serial_write(fd, cmd, cmdlen);
 
        if ((cmd[0] == CMD_UART_SPEED)
                                || (cmd[0] == CMD_PORT_MODE)
@@ -857,7 +857,7 @@ static unsigned char buspirate_jtag_command(int buspirate_fd,
                default:
                        LOG_INFO("Wrong !");
                }
-               res =  buspirate_serial_read(buspirate_fd, cmd, len);
+               res =  buspirate_serial_read(fd, cmd, len);
                if (res > 0)
                        return (unsigned char)cmd[1];
                else
@@ -874,8 +874,8 @@ static int buspirate_serial_setspeed(int fd, speed_t speed)
        struct termios t_opt;
 
        /* set the serial port parameters */
-       fcntl(buspirate_fd, F_SETFL, 0);
-       tcgetattr(buspirate_fd, &t_opt);
+       fcntl(fd, F_SETFL, 0);
+       tcgetattr(fd, &t_opt);
        cfsetispeed(&t_opt, speed);
        cfsetospeed(&t_opt, speed);
        t_opt.c_cflag |= (CLOCAL | CREAD);
@@ -888,8 +888,8 @@ static int buspirate_serial_setspeed(int fd, speed_t speed)
        t_opt.c_oflag &= ~OPOST;
        t_opt.c_cc[VMIN] = 0;
        t_opt.c_cc[VTIME] = 10;
-       tcflush(buspirate_fd, TCIFLUSH);
-       tcsetattr(buspirate_fd, TCSANOW, &t_opt);
+       tcflush(fd, TCIFLUSH);
+       tcsetattr(fd, TCSANOW, &t_opt);
 
        return 0;
 }

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)