- while (cmd != NULL)
- {
- switch (cmd->type)
- {
- case JTAG_END_STATE:
- DEBUG_JTAG_IO("end_state: %i", cmd->cmd.end_state->end_state);
-
- if (cmd->cmd.end_state->end_state != -1)
- {
- jlink_end_state(cmd->cmd.end_state->end_state);
- }
- break;
-
- case JTAG_RUNTEST:
- DEBUG_JTAG_IO( "runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, \
- cmd->cmd.runtest->end_state);
-
- if (cmd->cmd.runtest->end_state != -1)
- {
- jlink_end_state(cmd->cmd.runtest->end_state);
- }
- jlink_runtest(cmd->cmd.runtest->num_cycles);
- break;
-
- case JTAG_STATEMOVE:
- DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state);
-
- if (cmd->cmd.statemove->end_state != -1)
- {
- jlink_end_state(cmd->cmd.statemove->end_state);
- }
- jlink_state_move();
- break;
-
- case JTAG_PATHMOVE:
- DEBUG_JTAG_IO("pathmove: %i states, end in %i", \
- cmd->cmd.pathmove->num_states, \
- cmd->cmd.pathmove->path[cmd->cmd.pathmove->num_states - 1]);
-
- jlink_path_move(cmd->cmd.pathmove->num_states, cmd->cmd.pathmove->path);
- break;
-
- case JTAG_SCAN:
- DEBUG_JTAG_IO("scan end in %i", cmd->cmd.scan->end_state);
-
- if (cmd->cmd.scan->end_state != -1)
- {
- jlink_end_state(cmd->cmd.scan->end_state);
- }
-
- scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
- DEBUG_JTAG_IO("scan input, length = %d", scan_size);
+ DEBUG_JTAG_IO("scan end in %s", tap_state_name(cmd->cmd.scan->end_state));
+
+ jlink_end_state(cmd->cmd.scan->end_state);
+
+ scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
+ DEBUG_JTAG_IO("scan input, length = %d", scan_size);