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:
parent
b58c1d808f
commit
79a73a786e
|
@ -244,17 +244,6 @@ struct jtag_tap *jtag_tap_by_string(const char *s)
|
||||||
return t;
|
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)
|
struct jtag_tap* jtag_tap_next_enabled(struct jtag_tap* p)
|
||||||
{
|
{
|
||||||
p = p ? p->next_tap : jtag_all_taps();
|
p = p ? p->next_tap : jtag_all_taps();
|
||||||
|
|
|
@ -51,6 +51,17 @@ static const Jim_Nvp nvp_jtag_tap_event[] = {
|
||||||
|
|
||||||
extern struct jtag_interface *jtag_interface;
|
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)
|
static bool scan_is_safe(tap_state_t state)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
|
|
Loading…
Reference in New Issue