]>
git.zerfleddert.de Git - usb-driver/blob - jtagmon.c
198a2c6cb1329b279a7ff6ed56af4c91db6191e5
24 void tapmon(unsigned char tck
, unsigned char tms
) {
25 static unsigned char last_tck
= 1;
26 static int state
= TEST_LOGIC_RESET
;
27 static char state_text
[32] = "Test Logic Reset";
28 char last_state_text
[32];
29 int last_state
= state
;
31 strcpy(last_state_text
, state_text
);
33 if (!last_tck
&& tck
) {
35 case TEST_LOGIC_RESET
:
37 state
= TEST_LOGIC_RESET
;
39 state
= RUN_TEST_IDLE
;
46 state
= RUN_TEST_IDLE
;
95 state
= RUN_TEST_IDLE
;
100 state
= TEST_LOGIC_RESET
;
144 state
= RUN_TEST_IDLE
;
150 case TEST_LOGIC_RESET
:
151 strcpy(state_text
, "Test Logic Reset");
154 strcpy(state_text
, "Run-Test / Idle");
157 strcpy(state_text
, "Select-DR");
160 strcpy(state_text
, "Capture-DR");
163 strcpy(state_text
, "Shift-DR");
166 strcpy(state_text
, "Exit1-DR");
169 strcpy(state_text
, "Pause-DR");
172 strcpy(state_text
, "Exit2-DR");
175 strcpy(state_text
, "Update-DR");
178 strcpy(state_text
, "Select-IR");
181 strcpy(state_text
, "Capture-IR");
184 strcpy(state_text
, "Shift-IR");
187 strcpy(state_text
, "Exit1-IR");
190 strcpy(state_text
, "Pause-IR");
193 strcpy(state_text
, "Exit2-IR");
196 strcpy(state_text
, "Update-IR");
200 if (last_state
!= state
) {
201 fprintf(stderr
,"TAP state transition from %s to %s\n", last_state_text
, state_text
);