summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-09-20 07:46:22 +0000
committerdbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-09-20 07:46:22 +0000
commit75581ffea63690c80f4914b2b4e30372b6a5c580 (patch)
tree213eff5ed6bd70a9ef592b541699cef5c28c89bf
parent965b331d0b92aeeb2cf798a0a894a5b5b23ac68a (diff)
downloadopenocd_libswd-75581ffea63690c80f4914b2b4e30372b6a5c580.tar.gz
openocd_libswd-75581ffea63690c80f4914b2b4e30372b6a5c580.tar.bz2
openocd_libswd-75581ffea63690c80f4914b2b4e30372b6a5c580.tar.xz
openocd_libswd-75581ffea63690c80f4914b2b4e30372b6a5c580.zip
Minor regression bugfix for the jtag_tap_handle_event() case
for disabling TAPs. We don't actually know how to make any JRCs which do that yet; but when we do, this will matter. git-svn-id: svn://svn.berlios.de/openocd/trunk@2735 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/tcl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d9047ac9..04fca227 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -373,13 +373,17 @@ static void jtag_tap_handle_event(jtag_tap_t *tap, enum jtag_event e)
Jim_GetString(jteap->body, NULL));
if (Jim_EvalObj(interp, jteap->body) != JIM_OK) {
Jim_PrintErrorMessage(interp);
- } else {
+ } else switch (e) {
+ case JTAG_TAP_EVENT_ENABLE:
+ case JTAG_TAP_EVENT_DISABLE:
/* NOTE: we currently assume the handlers
* can't fail. That presumes later code
* will be verifying the scan chains ...
*/
- if (e == JTAG_TAP_EVENT_ENABLE)
- tap->enabled = true;
+ tap->enabled = (e == JTAG_TAP_EVENT_ENABLE);
+ break;
+ default:
+ break;
}
}