Skip to content

Commit d654a9d

Browse files
committed
esp_usb_jtag: toggleClk: ignore tdi/tms and keep these pins to the current state
1 parent c7c0d94 commit d654a9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/esp_usb_jtag.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,14 @@ int esp_usb_jtag::writeTMS(const uint8_t *tms, uint32_t len, bool flush_buffer,
514514
* the full sequence
515515
* when len > OUT_BUF_SZ we have to sent OUT_BUF_SZ x n + remaining bits
516516
* here is_high_nibble must be re-computed more than one time
517+
* tms and tdi are ignored: current pins state are kept, only the clock
518+
* is toggled.
517519
*/
518520

519521
/* Here we have to write len bit or 2xlen Bytes
520522
*/
521-
int esp_usb_jtag::toggleClk(uint8_t tms, uint8_t tdi, uint32_t len)
523+
int esp_usb_jtag::toggleClk(__attribute__((unused))uint8_t tms,
524+
uint8_t __attribute__((unused))tdi, uint32_t len)
522525
{
523526
uint8_t buf[OUT_BUF_SZ];
524527
char mess[256];
@@ -530,9 +533,6 @@ int esp_usb_jtag::toggleClk(uint8_t tms, uint8_t tdi, uint32_t len)
530533
if (len == 0)
531534
return 0;
532535

533-
_tms = tms; // store tms as new default tms state
534-
_tdi = tdi; // store tdi as new default tdi state
535-
536536
const uint8_t cmd = CMD_CLK(0, _tdi, _tms); // cmd is constant
537537
const uint8_t prev_high_nibble = (cmd << 4) | cmd;
538538
uint32_t real_len = 0;

0 commit comments

Comments
 (0)