summaryrefslogtreecommitdiff
path: root/src/jtag/presto.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-08-10 19:44:06 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-08-10 19:44:06 +0000
commit20e4e77cdf366dedac21ff5670c54291feadfc05 (patch)
tree95363c4dc5940d7e0e94be81ba76b73e92ff1cf3 /src/jtag/presto.c
parent835e6440b8d1d26b4e041be7edab200ab2c572ee (diff)
downloadopenocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.gz
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.bz2
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.tar.xz
openocd+libswd-20e4e77cdf366dedac21ff5670c54291feadfc05.zip
- renamed M5960 USB JTAG to "flyswatter"
- make ep93xx and at91rm9200 bitbang JTAG interfaces dependant on ARM host (thanks to Vincent Palatin) - various whitespace fixes - removed various warnings - add support for Debian GNU/kFreeBSD (thanks to Uwe Hermann) - fix OpenOCD compilation for various platforms (thanks to Uwe Hermann and Vincent Palatin) - switched order of JTAG chain examination and validation (examine first, then multiple validation tries even if examination failed) - added target_request subsystem to handle requests from the target (debug messages and tracepoints implemented, future enhancements might include semihosting, all ARM7/9 only for now) - added support for GDB vFlashXXX packets (thanks to Pavel Chromy) - added support for receiving data via ARM7/9 DCC - reworked flash writing. the 'flash write' command is now deprecated and replaced by 'flash write_binary' (old syntax and behaviour) and 'flash write_image' (write image files (bin, hex, elf, s19) to a target). - added support for AMD/ST/SST 29F400B non-cfi flashes git-svn-id: svn://svn.berlios.de/openocd/trunk@190 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/presto.c')
-rw-r--r--src/jtag/presto.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/jtag/presto.c b/src/jtag/presto.c
index fe54b131..95c59303 100644
--- a/src/jtag/presto.c
+++ b/src/jtag/presto.c
@@ -135,7 +135,6 @@ BYTE presto_init_seq[] =
int presto_open(char *req_serial)
{
int i;
- int result;
DWORD numdevs;
DWORD vidpid;
char devname[FT_DEVICE_NAME_LEN];
@@ -144,7 +143,7 @@ int presto_open(char *req_serial)
BYTE presto_data;
unsigned long ftbytes;
- presto->handle=INVALID_HANDLE_VALUE;
+ presto->handle = (FT_HANDLE)INVALID_HANDLE_VALUE;
presto->buff_out_pos=0;
presto->buff_in_pos=0;
@@ -169,10 +168,10 @@ int presto_open(char *req_serial)
break;
}
FT_Close(presto->handle);
- presto->handle=INVALID_HANDLE_VALUE;
+ presto->handle = (FT_HANDLE)INVALID_HANDLE_VALUE;
}
- if (presto->handle==INVALID_HANDLE_VALUE) return PRST_ERR;
+ if (presto->handle == (FT_HANDLE)INVALID_HANDLE_VALUE) return PRST_ERR;
if ((presto->status=FT_SetLatencyTimer(presto->handle,1))!=FT_OK) return PRST_ERR;
if ((presto->status=FT_SetTimeouts(presto->handle,100,0))!=FT_OK) return PRST_ERR;
@@ -219,7 +218,7 @@ int presto_close(void)
int result=PRST_OK;
- if (presto->handle==INVALID_HANDLE_VALUE) return result;
+ if (presto->handle == (FT_HANDLE)INVALID_HANDLE_VALUE) return result;
presto->status=FT_Write(presto->handle,&presto_init_seq,sizeof(presto_init_seq),&ftbytes);
if (presto->status!=FT_OK) result=PRST_ERR;
@@ -228,7 +227,7 @@ int presto_close(void)
if ((presto->status=FT_SetLatencyTimer(presto->handle,16))!=FT_OK) result=PRST_ERR;
if ((presto->status=FT_Close(presto->handle))!=FT_OK) result=PRST_ERR;
- else presto->handle=INVALID_HANDLE_VALUE;
+ else presto->handle = (FT_HANDLE)INVALID_HANDLE_VALUE;
return result;
}