aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/ft2232.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-25 10:06:57 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-07-25 10:06:57 +0000
commit290e01c62afdfd5f6eb76a4caef266344510f2c0 (patch)
treed1bc200336f595ce782427f6c86724f7135aa16b /src/jtag/ft2232.c
parent1429d2c659ab9b84dee673e7697da7eab44a8f90 (diff)
- reformat src/jtag/bitq.c (thanks to Pavel Chromy)
- fix multiple reads from FT2232 into same buffer location (thanks to Magnus Lundin) - retry JTAG chain validation (thanks to Magnus Lundin) - reworked GDB packet input handling (thanks to Pavel Chromy) - output error message when setting a watchpoint failed - removed duplicate out-of-bounds check in at91sam7.c (thanks to Pavel Chromy) git-svn-id: svn://svn.berlios.de/openocd/trunk@181 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/ft2232.c')
-rw-r--r--src/jtag/ft2232.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c
index a6dbadc6..44b0e6a8 100644
--- a/src/jtag/ft2232.c
+++ b/src/jtag/ft2232.c
@@ -205,7 +205,8 @@ int ft2232_read(u8* buf, int size, u32* bytes_read)
while ((*bytes_read < size) && timeout--)
{
- if ((status = FT_Read(ftdih, buf, size, &dw_bytes_read)) != FT_OK)
+ if ((status = FT_Read(ftdih, buf + *bytes_read, size -
+ *bytes_read, &dw_bytes_read)) != FT_OK)
{
*bytes_read = 0;
ERROR("FT_Read returned: %lu", status);