From 6d46ad11b539549fc7fc2d0c0a94653f29388068 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sat, 15 Feb 2014 22:28:49 +0400 Subject: [PATCH] ft2232: warn about lack of TRST on "turtle" adapter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes a build error (assigning a variable to itself) with clang. Since this adapter lacks trst, trying to use it in reset_config will fail silently. Warn the user accordingly. Change-Id: I16fd20936f00d7ff82962f4fcc629ff434aa4dce Reported-by: Rainer Müller Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/1946 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/jtag/drivers/ft2232.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c index e07e5130..c4a74ef7 100644 --- a/src/jtag/drivers/ft2232.c +++ b/src/jtag/drivers/ft2232.c @@ -1511,7 +1511,8 @@ static void minimodule_reset(int trst, int srst) static void turtle_reset(int trst, int srst) { - trst = trst; + if (trst == 1) + LOG_ERROR("Can't assert TRST: the adapter lacks this signal"); if (srst == 1) low_output |= nSRST; -- 2.39.5