+void gw16012_path_move(pathmove_command_t *cmd)
+{
+ int num_states = cmd->num_states;
+ int state_count;
+
+ state_count = 0;
+ while (num_states)
+ {
+ gw16012_control(0x0); /* single-bit mode */
+ if (tap_transitions[cur_state].low == cmd->path[state_count])
+ {
+ gw16012_data(0x0); /* TCK cycle with TMS low */
+ }
+ else if (tap_transitions[cur_state].high == cmd->path[state_count])
+ {
+ gw16012_data(0x2); /* TCK cycle with TMS high */
+ }
+ else
+ {
+ ERROR("BUG: %s -> %s isn't a valid TAP transition", tap_state_strings[cur_state], tap_state_strings[cmd->path[state_count]]);
+ exit(-1);
+ }
+
+ cur_state = cmd->path[state_count];
+ state_count++;
+ num_states--;
+ }
+
+ end_state = cur_state;
+}
+