From 4b2defe678917bfc366483c5ba775747af62b3c3 Mon Sep 17 00:00:00 2001 From: oharboe Date: Tue, 8 Apr 2008 09:03:49 +0000 Subject: 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 --- src/jtag/bitbang.c | 2 ++ src/jtag/jtag.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3