X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fjtag%2Fbitq.c;h=74555d2bc497d2c1486c104784c37f91571289b9;hb=78c6b922e21849ed8a2d3af4ca55c84c3d1ac185;hp=cb7b511a285427961c0cd1d1eb97f15ef675d39d;hpb=dc575dc5bf8cb597a0e9a47794744ae6b1928087;p=openocd.git diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c index cb7b511a28..74555d2bc4 100644 --- a/src/jtag/bitq.c +++ b/src/jtag/bitq.c @@ -25,9 +25,16 @@ #include "interface.h" -bitq_interface_t* bitq_interface; /* low level bit queue interface */ +struct bitq_interface* bitq_interface; /* low level bit queue interface */ -static bitq_state_t bitq_in_state; /* state of input queue */ +/* state of input queue */ +struct bitq_state { + struct jtag_command *cmd; /* command currently processed */ + int field_idx; /* index of field currently being processed */ + int bit_pos; /* position of bit curently being processed */ + int status; /* processing status */ +}; +static struct bitq_state bitq_in_state; static uint8_t* bitq_in_buffer; /* buffer dynamically reallocated as needed */ static int bitq_in_bufsize = 32; /* min. buffer size */ @@ -44,7 +51,7 @@ void bitq_in_proc(void) static int in_idx; /* index of byte being scanned */ static uint8_t in_mask; /* mask of next bit to be scanned */ - scan_field_t* field; + struct scan_field* field; int tdo; /* loop through the queue */ @@ -171,7 +178,7 @@ void bitq_state_move(tap_state_t new_state) } -void bitq_path_move(pathmove_command_t* cmd) +void bitq_path_move(struct pathmove_command* cmd) { int i; @@ -213,7 +220,7 @@ void bitq_runtest(int num_cycles) } -void bitq_scan_field(scan_field_t* field, int pause) +void bitq_scan_field(struct scan_field* field, int pause) { int bit_cnt; int tdo_req; @@ -265,7 +272,7 @@ void bitq_scan_field(scan_field_t* field, int pause) } -void bitq_scan(scan_command_t* cmd) +void bitq_scan(struct scan_command* cmd) { int i; @@ -283,7 +290,7 @@ void bitq_scan(scan_command_t* cmd) int bitq_execute_queue(void) { - jtag_command_t* cmd = jtag_command_queue; /* currently processed command */ + struct jtag_command* cmd = jtag_command_queue; /* currently processed command */ bitq_in_state.cmd = jtag_command_queue; bitq_in_state.field_idx = 0;