diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-12-03 16:25:51 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-12-04 03:34:32 -0800 |
commit | 79a73a786ee0f95b49d86abbdea1e985049c5b1f (patch) | |
tree | 2fbc34596522386b83f92a2c8835e7c7224d43df /src | |
parent | b58c1d808fcdeb7a751c1ecf4e5512a8943ec263 (diff) |
separate Jim from jtag/core.c
After previous efforts, only one Jim routine remained in jtag/core.c,
and moving it to jtag/tcl.c painlessly finishes separating these layers.
The headers need separating, but the implementation is clean.
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/core.c | 11 | ||||
-rw-r--r-- | src/jtag/tcl.c | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index 9230cc2b..433b50bf 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -244,17 +244,6 @@ struct jtag_tap *jtag_tap_by_string(const char *s) return t; } -struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o) -{ - const char *cp = Jim_GetString(o, NULL); - struct jtag_tap *t = cp ? jtag_tap_by_string(cp) : NULL; - if (NULL == cp) - cp = "(unknown)"; - if (NULL == t) - Jim_SetResult_sprintf(interp, "Tap '%s' could not be found", cp); - return t; -} - struct jtag_tap* jtag_tap_next_enabled(struct jtag_tap* p) { p = p ? p->next_tap : jtag_all_taps(); diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 81bafbb6..9704c302 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -51,6 +51,17 @@ static const Jim_Nvp nvp_jtag_tap_event[] = { extern struct jtag_interface *jtag_interface; +struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o) +{ + const char *cp = Jim_GetString(o, NULL); + struct jtag_tap *t = cp ? jtag_tap_by_string(cp) : NULL; + if (NULL == cp) + cp = "(unknown)"; + if (NULL == t) + Jim_SetResult_sprintf(interp, "Tap '%s' could not be found", cp); + return t; +} + static bool scan_is_safe(tap_state_t state) { switch (state) |