eaf14aedc0a1a6f615cdaf5ce0962ac838992ce3
[openocd.git] / src / jtag / drivers / ftd2xx_common.h
1 /***************************************************************************
2 * Copyright (C) 2011 by Spencer Oliver <spen@spen-soft.co.uk> *
3 * *
4 * Written by Arnim Laeuger, 2008 (from urjtag) *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 ***************************************************************************/
19
20 #ifndef OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
21 #define OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
22
23 #if ((BUILD_PRESTO_FTD2XX == 1) || (BUILD_USB_BLASTER_FTD2XX == 1))
24 #include <ftd2xx.h>
25
26 static const char *ftd2xx_status_string(FT_STATUS status)
27 {
28 switch (status) {
29 case FT_OK: return "OK";
30 case FT_INVALID_HANDLE: return "invalid handle";
31 case FT_DEVICE_NOT_FOUND: return "device not found";
32 case FT_DEVICE_NOT_OPENED: return "device not opened";
33 case FT_IO_ERROR: return "io error";
34 case FT_INSUFFICIENT_RESOURCES: return "insufficient resources";
35 case FT_INVALID_PARAMETER: return "invalid parameter";
36 case FT_INVALID_BAUD_RATE: return "invalid baud rate";
37
38 case FT_DEVICE_NOT_OPENED_FOR_ERASE: return "device not opened for erase";
39 case FT_DEVICE_NOT_OPENED_FOR_WRITE: return "device not opened for write";
40 case FT_FAILED_TO_WRITE_DEVICE: return "failed to write device";
41 case FT_EEPROM_READ_FAILED: return "eeprom read failed";
42 case FT_EEPROM_WRITE_FAILED: return "eeprom write failed";
43 case FT_EEPROM_ERASE_FAILED: return "eeprom erase failed";
44 case FT_EEPROM_NOT_PRESENT: return "eeprom not present";
45 case FT_EEPROM_NOT_PROGRAMMED: return "eeprom not programmed";
46 case FT_INVALID_ARGS: return "invalid args";
47 case FT_NOT_SUPPORTED: return "not supported";
48 case FT_OTHER_ERROR: return "other error";
49 }
50
51 return "undefined FTD2xx error";
52 }
53
54 #endif
55 #endif /* OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H */

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)