From baf1797406ff80356ca7212df35f21d66dcc030e Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Wed, 26 Sep 2012 15:31:53 +0100 Subject: [PATCH] ftdi: incorrectly using output register for direction fix a simple copy/paste bug. Change-Id: I5caaa4d16d30f26a453bd6a00c95261fd6e716c5 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/849 Reviewed-by: Freddie Chopin Tested-by: jenkins Reviewed-by: Andreas Fritiofson --- src/jtag/drivers/ftdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index a038a232..f04b390c 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -175,7 +175,7 @@ static int ftdi_set_signal(const struct signal *s, char value) output = data ? output | s->data_mask : output & ~s->data_mask; if (s->oe_mask == s->data_mask) - direction = oe ? output | s->oe_mask : output & ~s->oe_mask; + direction = oe ? direction | s->oe_mask : direction & ~s->oe_mask; else output = oe ? output | s->oe_mask : output & ~s->oe_mask; -- 2.39.5