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.
This commit is contained in:
Zachary T Welch 2009-12-03 16:25:51 -08:00
parent b58c1d808f
commit 79a73a786e
2 changed files with 11 additions and 11 deletions

View File

@ -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();

View File

@ -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)