Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit b074303

Browse files
committed
hosted/ftdi: Implement unoptimized jtagtap_cycles
1 parent c0cea0c commit b074303

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/platforms/hosted/ftdi_jtag.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static void ftdi_jtag_reset(void);
3333
static void ftdi_jtag_tms_seq(uint32_t tms_states, size_t clock_cycles);
3434
static void ftdi_jtag_tdi_seq(bool final_tms, const uint8_t *data_in, size_t clock_cycles);
3535
static bool ftdi_jtag_next(bool tms, bool tdi);
36+
static void ftdi_jtag_cycles(bool tms, bool tdi, size_t clock_cycles);
3637

3738
/*
3839
* Throughout this file you will see command buffers being built which have the following basic form:
@@ -78,7 +79,7 @@ bool ftdi_jtag_init(void)
7879
jtag_proc.jtagtap_tms_seq = ftdi_jtag_tms_seq;
7980
jtag_proc.jtagtap_tdi_tdo_seq = ftdi_jtag_tdi_tdo_seq;
8081
jtag_proc.jtagtap_tdi_seq = ftdi_jtag_tdi_seq;
81-
jtag_proc.jtagtap_cycle = NULL;
82+
jtag_proc.jtagtap_cycle = ftdi_jtag_cycles;
8283
jtag_proc.tap_idle_cycles = 1;
8384

8485
active_state.data[0] |= active_cable.jtag.set_data_low | MPSSE_CS | MPSSE_DI | MPSSE_DO;
@@ -146,3 +147,9 @@ static bool ftdi_jtag_next(const bool tms, const bool tdi)
146147
ftdi_buffer_read_val(ret);
147148
return ret & 0x80U;
148149
}
150+
151+
static void ftdi_jtag_cycles(const bool tms, const bool tdi, const size_t clock_cycles)
152+
{
153+
for (size_t i = 0; i < clock_cycles; i++)
154+
ftdi_jtag_next(tms, tdi);
155+
}

0 commit comments

Comments
 (0)