summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-08 09:03:49 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-08 09:03:49 +0000
commit4b2defe678917bfc366483c5ba775747af62b3c3 (patch)
tree319554fc457fe72775d13bebd8b3f38b007a4d2f
parent0d4f8fc824c1d07cf385b13483f703456322d4ae (diff)
downloadopenocd+libswd-4b2defe678917bfc366483c5ba775747af62b3c3.tar.gz
openocd+libswd-4b2defe678917bfc366483c5ba775747af62b3c3.tar.bz2
openocd+libswd-4b2defe678917bfc366483c5ba775747af62b3c3.tar.xz
openocd+libswd-4b2defe678917bfc366483c5ba775747af62b3c3.zip
The endstate now reports the endstate of the queue instead of
reading endstate variable internal to the driver. git-svn-id: svn://svn.berlios.de/openocd/trunk@546 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/bitbang.c2
-rw-r--r--src/jtag/jtag.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c
index 16b5f191..97ea94e0 100644
--- a/src/jtag/bitbang.c
+++ b/src/jtag/bitbang.c
@@ -43,6 +43,8 @@ int bitbang_execute_queue(void);
/* The bitbang driver leaves the TCK 0 when in idle */
+static enum tap_state end_state;
+static enum tap_state cur_state;
void bitbang_end_state(enum tap_state state)
{
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 9a95de42..3d2fb294 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -109,6 +109,11 @@ char* jtag_event_strings[] =
"JTAG controller reset(tms or TRST)"
};
+/* kludge!!!! these are just global variables that the
+ * interface use internally. They really belong
+ * inside the drivers, but we don't want to break
+ * linking the drivers!!!!
+ */
enum tap_state end_state = TAP_TLR;
enum tap_state cur_state = TAP_TLR;
int jtag_trst = 0;
@@ -1812,7 +1817,7 @@ int handle_endstate_command(struct command_context_s *cmd_ctx, char *cmd, char *
}
}
}
- command_print(cmd_ctx, "current endstate: %s", tap_state_strings[end_state]);
+ command_print(cmd_ctx, "current endstate: %s", tap_state_strings[cmd_queue_end_state]);
return ERROR_OK;
}