{
.name = "at91rm9200",
+ .supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = bitbang_execute_queue,
.speed = at91rm9200_speed,
tap_set_state(tap_get_end_state());
}
+
+/**
+ * Clock a bunch of TMS (or SWDIO) transitions, to change the JTAG
+ * (or SWD) state machine.
+ */
+static int bitbang_execute_tms(struct jtag_command *cmd)
+{
+ unsigned num_bits = cmd->cmd.tms->num_bits;
+ const uint8_t *bits = cmd->cmd.tms->bits;
+
+ DEBUG_JTAG_IO("TMS: %d bits", num_bits);
+
+ int tms = 0;
+ for (unsigned i = 0; i < num_bits; i++)
+ {
+ tms = ((bits[i/8] >> (i % 8)) & 1);
+ bitbang_interface->write(0, tms, 0);
+ bitbang_interface->write(1, tms, 0);
+ }
+ bitbang_interface->write(CLOCK_IDLE(), tms, 0);
+
+ return ERROR_OK;
+}
+
+
static void bitbang_path_move(struct pathmove_command *cmd)
{
int num_states = cmd->num_states;
#endif
jtag_sleep(cmd->cmd.sleep->us);
break;
+ case JTAG_TMS:
+ retval = bitbang_execute_tms(cmd);
+ break;
default:
LOG_ERROR("BUG: unknown JTAG command type encountered");
exit(-1);
struct jtag_interface dummy_interface = {
.name = "dummy",
+ .supported = DEBUG_CAP_TMS_SEQ,
.commands = dummy_command_handlers,
.execute_queue = &bitbang_execute_queue,
struct jtag_interface parport_interface = {
.name = "parport",
+ .supported = DEBUG_CAP_TMS_SEQ,
.commands = parport_command_handlers,
.init = parport_init,
struct jtag_interface usb_blaster_interface = {
.name = "usb_blaster",
.commands = usb_blaster_command_handlers,
+ .supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = bitbang_execute_queue,