aboutsummaryrefslogtreecommitdiff
path: root/src/xsvf/xsvf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsvf/xsvf.c')
-rw-r--r--src/xsvf/xsvf.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index 0266c21..617c2f4 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -111,10 +111,10 @@ TDO (1);
static int xsvf_fd;
-/* map xsvf tap state to an openocd "tap_state_t" */
-static tap_state_t xsvf_to_tap(int xsvf_state)
+/* map xsvf tap state to an openocd "enum tap_state" */
+static enum tap_state xsvf_to_tap(int xsvf_state)
{
- tap_state_t ret;
+ enum tap_state ret;
switch (xsvf_state) {
case XSV_RESET:
@@ -196,16 +196,16 @@ COMMAND_HANDLER(handle_xsvf_command)
int xruntest = 0; /* number of TCK cycles OR *microseconds */
int xrepeat = 0; /* number of retries */
- tap_state_t xendir = TAP_IDLE; /* see page 8 of the SVF spec, initial
+ enum tap_state xendir = TAP_IDLE; /* see page 8 of the SVF spec, initial
*xendir to be TAP_IDLE */
- tap_state_t xenddr = TAP_IDLE;
+ enum tap_state xenddr = TAP_IDLE;
uint8_t opcode;
uint8_t uc = 0;
long file_offset = 0;
int loop_count = 0;
- tap_state_t loop_state = TAP_IDLE;
+ enum tap_state loop_state = TAP_IDLE;
int loop_clocks = 0;
int loop_usecs = 0;
@@ -216,8 +216,8 @@ COMMAND_HANDLER(handle_xsvf_command)
int verbose = 1;
bool collecting_path = false;
- tap_state_t path[XSTATE_MAX_PATH];
- unsigned pathlen = 0;
+ enum tap_state path[XSTATE_MAX_PATH];
+ unsigned int pathlen = 0;
/* a flag telling whether to clock TCK during waits,
* or simply sleep, controlled by virt2
@@ -272,7 +272,7 @@ COMMAND_HANDLER(handle_xsvf_command)
* or terminate a path.
*/
if (collecting_path) {
- tap_state_t mystate;
+ enum tap_state mystate;
switch (opcode) {
case XCOMMENT:
@@ -455,7 +455,7 @@ COMMAND_HANDLER(handle_xsvf_command)
* will be skipped entirely if xrepeat is set to zero.
*/
- static tap_state_t exception_path[] = {
+ static enum tap_state exception_path[] = {
TAP_DREXIT2,
TAP_DRSHIFT,
TAP_DREXIT1,
@@ -563,7 +563,7 @@ COMMAND_HANDLER(handle_xsvf_command)
case XSTATE:
{
- tap_state_t mystate;
+ enum tap_state mystate;
if (read(xsvf_fd, &uc, 1) < 0) {
do_abort = 1;
@@ -654,7 +654,7 @@ COMMAND_HANDLER(handle_xsvf_command)
uint8_t short_buf[2];
uint8_t *ir_buf;
int bitcount;
- tap_state_t my_end_state = xruntest ? TAP_IDLE : xendir;
+ enum tap_state my_end_state = xruntest ? TAP_IDLE : xendir;
if (opcode == XSIR) {
/* one byte bitcount */
@@ -744,15 +744,15 @@ COMMAND_HANDLER(handle_xsvf_command)
uint8_t end;
uint8_t delay_buf[4];
- tap_state_t wait_state;
- tap_state_t end_state;
+ enum tap_state wait_state;
+ enum tap_state end_state;
int delay;
if (read(xsvf_fd, &wait_local, 1) < 0
- || read(xsvf_fd, &end, 1) < 0
- || read(xsvf_fd, delay_buf, 4) < 0) {
- do_abort = 1;
- break;
+ || read(xsvf_fd, &end, 1) < 0
+ || read(xsvf_fd, delay_buf, 4) < 0) {
+ do_abort = 1;
+ break;
}
wait_state = xsvf_to_tap(wait_local);
@@ -788,8 +788,8 @@ COMMAND_HANDLER(handle_xsvf_command)
uint8_t usecs_buf[4];
uint8_t wait_local;
uint8_t end;
- tap_state_t wait_state;
- tap_state_t end_state;
+ enum tap_state wait_state;
+ enum tap_state end_state;
int clock_count;
int usecs;