}
}
-
/*-----<Cable Helper API>---------------------------------------*/
/* these Cable Helper API functions are all documented in the jtag.h header file,
return end_state_follower;
}
-
int tap_move_ndx( tap_state_t astate )
{
/* given a stable state, return the index into the tms_seqs[] array within tap_get_tms_path() */
return ndx;
}
-
int tap_get_tms_path( tap_state_t from, tap_state_t to )
{
/* tap_move[i][j]: tap movement command to go from state i to state j
return tms_seqs[tap_move_ndx(from)][tap_move_ndx(to)];
}
-
-BOOL tap_is_state_stable(tap_state_t astate)
+int tap_is_state_stable(tap_state_t astate)
{
- BOOL is_stable;
+ int is_stable;
/* A switch() is used because it is symbol dependent
(not value dependent like an array), and can also check bounds.
case TAP_DRPAUSE:
case TAP_IRSHIFT:
case TAP_IRPAUSE:
- is_stable = TRUE;
+ is_stable = 1;
break;
default:
- is_stable = FALSE;
+ is_stable = 0;
}
return is_stable;
}
-tap_state_t tap_state_transition(tap_state_t cur_state, BOOL tms)
+tap_state_t tap_state_transition(tap_state_t cur_state, int tms)
{
tap_state_t new_state;
#include "command.h"
-
#if 0
#define _DEBUG_JTAG_IO_
#endif
#define DEBUG_JTAG_IOZ 64
#endif
-
/* 16 Tap States, from page 21 of ASSET InterTech, Inc.'s svf.pdf
*/
enum tap_state {
typedef enum tap_state tap_state_t;
-typedef unsigned BOOL;
-#define TRUE 1
-#define FALSE 0
-
typedef struct tap_transition_s
{
tap_state_t high;
//extern tap_transition_t tap_transitions[16]; /* describe the TAP state diagram */
-
/*-----<Cable Helper API>-------------------------------------------*/
/* The "Cable Helper API" is what the cable drivers can use to help implement
* Function tap_is_state_stable
* returns TRUE if the \a astate is stable.
*/
-BOOL tap_is_state_stable(tap_state_t astate);
+int tap_is_state_stable(tap_state_t astate);
/**
* Function tap_state_transition
* @param tms is either zero or non-zero, just like a real TMS line in a jtag interface.
* @return tap_state_t - the next state a TAP would enter.
*/
-tap_state_t tap_state_transition(tap_state_t current_state, BOOL tms);
+tap_state_t tap_state_transition(tap_state_t current_state, int tms);
/**
* Function tap_state_name
/*-----</Cable Helper API>------------------------------------------*/
-
extern tap_state_t cmd_queue_end_state; /* finish DR scans in dr_end_state */
extern tap_state_t cmd_queue_cur_state; /* current TAP state */