"JTAG controller reset (RESET or TRST)"
};
-const Jim_Nvp nvp_jtag_tap_event[] = {
- { .value = JTAG_TAP_EVENT_ENABLE, .name = "tap-enable" },
- { .value = JTAG_TAP_EVENT_DISABLE, .name = "tap-disable" },
-
- { .name = NULL, .value = -1 }
-};
-
static int jtag_trst = 0;
static int jtag_srst = 0;
return jtag->srst_asserted(srst_asserted);
}
-void jtag_tap_handle_event( jtag_tap_t * tap, enum jtag_tap_event e)
-{
- jtag_tap_event_action_t * jteap;
- int done;
-
- jteap = tap->event_action;
-
- done = 0;
- while (jteap) {
- if (jteap->event == e) {
- done = 1;
- LOG_DEBUG( "JTAG tap: %s event: %d (%s) action: %s\n",
- tap->dotted_name,
- e,
- Jim_Nvp_value2name_simple(nvp_jtag_tap_event, e)->name,
- Jim_GetString(jteap->body, NULL) );
- if (Jim_EvalObj(interp, jteap->body) != JIM_OK) {
- Jim_PrintErrorMessage(interp);
- }
- }
-
- jteap = jteap->next;
- }
-
- if (!done) {
- LOG_DEBUG( "event %d %s - no action",
- e,
- Jim_Nvp_value2name_simple( nvp_jtag_tap_event, e)->name);
- }
-}
-
int jtag_add_statemove(tap_state_t goal_state)
{
tap_state_t cur_state = cmd_queue_cur_state;
extern int jtag_call_event_callbacks(enum jtag_event event);
extern int jtag_register_event_callback(int (* callback)(enum jtag_event event, void* priv), void* priv);
-void jtag_tap_handle_event(jtag_tap_t* tap, enum jtag_tap_event e);
-
/*
* The JTAG subsystem defines a number of error codes,
* using codes between -100 and -199.
#include <strings.h>
#endif
-extern const Jim_Nvp nvp_jtag_tap_event[];
+static const Jim_Nvp nvp_jtag_tap_event[] = {
+ { .value = JTAG_TAP_EVENT_ENABLE, .name = "tap-enable" },
+ { .value = JTAG_TAP_EVENT_DISABLE, .name = "tap-disable" },
+
+ { .name = NULL, .value = -1 }
+};
/* jtag interfaces (parport, FTDI-USB, TI-USB, ...)
*/
return JIM_ERR;
}
+static void jtag_tap_handle_event( jtag_tap_t * tap, enum jtag_tap_event e)
+{
+ jtag_tap_event_action_t * jteap;
+ int done;
+
+ jteap = tap->event_action;
+
+ done = 0;
+ while (jteap) {
+ if (jteap->event == e) {
+ done = 1;
+ LOG_DEBUG( "JTAG tap: %s event: %d (%s) action: %s\n",
+ tap->dotted_name,
+ e,
+ Jim_Nvp_value2name_simple(nvp_jtag_tap_event, e)->name,
+ Jim_GetString(jteap->body, NULL) );
+ if (Jim_EvalObj(interp, jteap->body) != JIM_OK) {
+ Jim_PrintErrorMessage(interp);
+ }
+ }
+
+ jteap = jteap->next;
+ }
+
+ if (!done) {
+ LOG_DEBUG( "event %d %s - no action",
+ e,
+ Jim_Nvp_value2name_simple( nvp_jtag_tap_event, e)->name);
+ }
+}
+
+
static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
{
Jim_GetOptInfo goi;