- renamed M5960 USB JTAG to "flyswatter"
[openocd.git] / src / jtag / presto.c
index fe54b1312fd95c7ac317a221f222946b9459e2ca..95c59303b0d68fa936a1857a07f66369c0659408 100644 (file)
@@ -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;
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)