From d654a9d6d5e6ce5e70b9a6d8c37a0a828e680aff Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Thu, 1 Jan 2026 12:46:39 +0100 Subject: [PATCH] esp_usb_jtag: toggleClk: ignore tdi/tms and keep these pins to the current state --- src/esp_usb_jtag.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/esp_usb_jtag.cpp b/src/esp_usb_jtag.cpp index 67a4839..e41d999 100644 --- a/src/esp_usb_jtag.cpp +++ b/src/esp_usb_jtag.cpp @@ -514,11 +514,14 @@ int esp_usb_jtag::writeTMS(const uint8_t *tms, uint32_t len, bool flush_buffer, * the full sequence * when len > OUT_BUF_SZ we have to sent OUT_BUF_SZ x n + remaining bits * here is_high_nibble must be re-computed more than one time + * tms and tdi are ignored: current pins state are kept, only the clock + * is toggled. */ /* Here we have to write len bit or 2xlen Bytes */ -int esp_usb_jtag::toggleClk(uint8_t tms, uint8_t tdi, uint32_t len) +int esp_usb_jtag::toggleClk(__attribute__((unused))uint8_t tms, + uint8_t __attribute__((unused))tdi, uint32_t len) { uint8_t buf[OUT_BUF_SZ]; char mess[256]; @@ -530,9 +533,6 @@ int esp_usb_jtag::toggleClk(uint8_t tms, uint8_t tdi, uint32_t len) if (len == 0) return 0; - _tms = tms; // store tms as new default tms state - _tdi = tdi; // store tdi as new default tdi state - const uint8_t cmd = CMD_CLK(0, _tdi, _tms); // cmd is constant const uint8_t prev_high_nibble = (cmd << 4) | cmd; uint32_t real_len = 0;