From: Spencer Oliver Date: Wed, 26 Sep 2012 14:31:53 +0000 (+0100) Subject: ftdi: incorrectly using output register for direction X-Git-Tag: v0.7.0-rc1~230 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=baf1797406ff80356ca7212df35f21d66dcc030e;p=openocd 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 --- 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;