]> git.sur5r.net Git - openocd/commitdiff
ftdi: incorrectly using output register for direction
authorSpencer Oliver <spen@spen-soft.co.uk>
Wed, 26 Sep 2012 14:31:53 +0000 (15:31 +0100)
committerFreddie Chopin <freddie.chopin@gmail.com>
Tue, 2 Oct 2012 11:23:48 +0000 (11:23 +0000)
fix a simple copy/paste bug.

Change-Id: I5caaa4d16d30f26a453bd6a00c95261fd6e716c5
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/849
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/jtag/drivers/ftdi.c

index a038a232af6d15e0779eafcd3b6d593c72492245..f04b390c1717b1c541c2e3e81fa9daa1cbda8ff3 100644 (file)
@@ -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;