From 8a009ca6ae965e268c5aa666953734e44bdc1585 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 19 Oct 2016 13:53:04 -0700 Subject: [PATCH] Corrected jtagtap_next signature. The parameter is TDI (as in input) not TDO. The header signature and comment are correct. --- src/platforms/libftdi/jtagtap.c | 6 +++--- src/platforms/stm32/jtagtap.c | 6 +++--- src/platforms/tm4c/jtagtap.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/platforms/libftdi/jtagtap.c b/src/platforms/libftdi/jtagtap.c index 0ac8b6c..11256d0 100644 --- a/src/platforms/libftdi/jtagtap.c +++ b/src/platforms/libftdi/jtagtap.c @@ -185,11 +185,11 @@ jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI, int } #endif -uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDO) +uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDI) { uint8_t ret; uint8_t tmp[3] = "\x6B\x00\x00"; - tmp[2] = (dTDO?0x80:0) | (dTMS?0x01:0); + tmp[2] = (dTDI?0x80:0) | (dTMS?0x01:0); // assert(ftdi_write_data(ftdic, tmp, 3) == 3); // while(ftdi_read_data(ftdic, &ret, 1) != 1); platform_buffer_write(tmp, 3); @@ -197,7 +197,7 @@ uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDO) ret &= 0x80; -// DEBUG("jtagtap_next(TMS = %d, TDO = %d) = %02X\n", dTMS, dTDO, ret); +// DEBUG("jtagtap_next(TMS = %d, TDI = %d) = %02X\n", dTMS, dTDI, ret); return ret; } diff --git a/src/platforms/stm32/jtagtap.c b/src/platforms/stm32/jtagtap.c index ecd0698..1ee8cfe 100644 --- a/src/platforms/stm32/jtagtap.c +++ b/src/platforms/stm32/jtagtap.c @@ -51,17 +51,17 @@ void jtagtap_reset(void) jtagtap_soft_reset(); } -inline uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDO) +inline uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDI) { uint16_t ret; gpio_set_val(TMS_PORT, TMS_PIN, dTMS); - gpio_set_val(TDI_PORT, TDI_PIN, dTDO); + gpio_set_val(TDI_PORT, TDI_PIN, dTDI); gpio_set(TCK_PORT, TCK_PIN); ret = gpio_get(TDO_PORT, TDO_PIN); gpio_clear(TCK_PORT, TCK_PIN); - //DEBUG("jtagtap_next(TMS = %d, TDO = %d) = %d\n", dTMS, dTDO, ret); + //DEBUG("jtagtap_next(TMS = %d, TDI = %d) = %d\n", dTMS, dTDI, ret); return ret != 0; } diff --git a/src/platforms/tm4c/jtagtap.c b/src/platforms/tm4c/jtagtap.c index c6b8d7e..056a4fd 100644 --- a/src/platforms/tm4c/jtagtap.c +++ b/src/platforms/tm4c/jtagtap.c @@ -26,17 +26,17 @@ jtagtap_reset(void) } uint8_t -jtagtap_next(const uint8_t dTMS, const uint8_t dTDO) +jtagtap_next(const uint8_t dTMS, const uint8_t dTDI) { uint16_t ret; gpio_set_val(TMS_PORT, TMS_PIN, dTMS); - gpio_set_val(TDI_PORT, TDI_PIN, dTDO); + gpio_set_val(TDI_PORT, TDI_PIN, dTDI); gpio_set(TCK_PORT, TCK_PIN); ret = gpio_get(TDO_PORT, TDO_PIN); gpio_clear(TCK_PORT, TCK_PIN); - DEBUG("jtagtap_next(TMS = %d, TDO = %d) = %d\n", dTMS, dTDO, ret); + DEBUG("jtagtap_next(TMS = %d, TDI = %d) = %d\n", dTMS, dTDI, ret); return ret != 0; }