Fix compilation of target_request.h when it is included first.
[openocd.git] / src / jtag / bitq.c
index 0d71c3018061ed9b033f7ddcf17745853b90e2ad..af17b63892a0bdb7869229672572288e4854a2ca 100644 (file)
 
 #include "bitq.h"
 
-/* project specific includes */
-#include "log.h"
-#include "types.h"
-#include "jtag.h"
-#include "configuration.h"
-
-/* system includes */
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
 
 bitq_interface_t* bitq_interface;       /* low level bit queue interface */
 
-bitq_state_t      bitq_in_state;        /* state of input queue */
+static bitq_state_t      bitq_in_state;        /* state of input queue */
 
-u8* bitq_in_buffer;                     /* buffer dynamically reallocated as needed */
-unsigned long     bitq_in_bufsize = 32; /* min. buffer size */
+static u8* bitq_in_buffer;                     /* buffer dynamically reallocated as needed */
+static int     bitq_in_bufsize = 32; /* min. buffer size */
 
 /*
  * input queue processing does not use jtag_read_buffer() to avoid unnecessary overhead
@@ -66,7 +56,7 @@ void bitq_in_proc(void)
                        while (bitq_in_state.field_idx<bitq_in_state.cmd->cmd.scan->num_fields)
                        {
                                field = &bitq_in_state.cmd->cmd.scan->fields[bitq_in_state.field_idx];
-                               if (field->in_value || field->in_handler)
+                               if (field->in_value)
                                {
                                        if (bitq_in_state.bit_pos==0)
                                        {
@@ -124,12 +114,6 @@ void bitq_in_proc(void)
                                                        in_mask <<= 1;
                                                bitq_in_state.bit_pos++;
                                        }
-
-
-                                       if (field->in_handler && bitq_in_state.status==ERROR_OK)
-                                       {
-                                               bitq_in_state.status = (*field->in_handler)(in_buff, field->in_handler_priv, field);
-                                       }
                                }
 
                                bitq_in_state.field_idx++;  /* advance to next field */
@@ -153,7 +137,7 @@ void bitq_io(int tms, int tdi, int tdo_req)
 
 void bitq_end_state(tap_state_t state)
 {
-       if (state==-1)
+       if (state==TAP_INVALID)
                return;
 
        if (!tap_is_state_stable(state))
@@ -238,7 +222,7 @@ void bitq_scan_field(scan_field_t* field, int pause)
        u8* out_ptr;
        u8  out_mask;
 
-       if (field->in_value || field->in_handler)
+       if (field->in_value)
                tdo_req = 1;
        else
                tdo_req = 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)