jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / pld / pld.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright (C) 2006 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
7
8 #ifndef OPENOCD_PLD_PLD_H
9 #define OPENOCD_PLD_PLD_H
10
11 #include <helper/command.h>
12
13 struct pld_device;
14
15 #define __PLD_CREATE_COMMAND(name) \
16 COMMAND_HELPER(name, struct pld_device *pld)
17
18 struct pld_ipdbg_hub {
19 struct jtag_tap *tap;
20 unsigned int user_ir_code;
21 };
22
23 int pld_has_jtagspi_instruction(struct pld_device *device, bool *has_instruction);
24 int pld_get_jtagspi_userircode(struct pld_device *pld_device, unsigned int *ir);
25
26 int pld_get_jtagspi_stuff_bits(struct pld_device *pld_device, unsigned int *facing_read_bits,
27 unsigned int *trailing_write_bits);
28 int pld_connect_spi_to_jtag(struct pld_device *pld_device);
29 int pld_disconnect_spi_from_jtag(struct pld_device *pld_device);
30
31 struct pld_driver {
32 const char *name;
33 __PLD_CREATE_COMMAND((*pld_create_command));
34 const struct command_registration *commands;
35 int (*load)(struct pld_device *pld_device, const char *filename);
36 int (*get_ipdbg_hub)(int user_num, struct pld_device *pld_device, struct pld_ipdbg_hub *hub);
37 int (*has_jtagspi_instruction)(struct pld_device *device, bool *has_instruction);
38 int (*get_jtagspi_userircode)(struct pld_device *pld_device, unsigned int *ir);
39 int (*connect_spi_to_jtag)(struct pld_device *pld_device);
40 int (*disconnect_spi_from_jtag)(struct pld_device *pld_device);
41 int (*get_stuff_bits)(struct pld_device *pld_device, unsigned int *facing_read_bits,
42 unsigned int *trailing_write_bits);
43 };
44
45 #define PLD_CREATE_COMMAND_HANDLER(name) \
46 static __PLD_CREATE_COMMAND(name)
47
48 struct pld_device {
49 struct pld_driver *driver;
50 void *driver_priv;
51 struct pld_device *next;
52 char *name;
53 };
54
55 int pld_register_commands(struct command_context *cmd_ctx);
56
57 struct pld_device *get_pld_device_by_num(int num);
58 struct pld_device *get_pld_device_by_name(const char *name);
59 struct pld_device *get_pld_device_by_name_or_numstr(const char *str);
60
61 #define ERROR_PLD_DEVICE_INVALID (-1000)
62 #define ERROR_PLD_FILE_LOAD_FAILED (-1001)
63
64 extern struct pld_driver efinix_pld;
65 extern struct pld_driver gatemate_pld;
66 extern struct pld_driver gowin_pld;
67 extern struct pld_driver intel_pld;
68 extern struct pld_driver lattice_pld;
69 extern struct pld_driver virtex2_pld;
70
71 #endif /* OPENOCD_PLD_PLD_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)