jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / jtag / drivers / OpenULINK / src / main.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 /***************************************************************************
4 * Copyright (C) 2011 by Martin Schmoelzer *
5 * <martin.schmoelzer@student.tuwien.ac.at> *
6 ***************************************************************************/
7
8 #include "main.h"
9
10 #include "io.h"
11 #include "usb.h"
12 #include "protocol.h"
13
14 extern void sudav_isr(void) __interrupt SUDAV_ISR;
15 extern void sof_isr(void) __interrupt;
16 extern void sutok_isr(void) __interrupt;
17 extern void suspend_isr(void) __interrupt;
18 extern void usbreset_isr(void) __interrupt;
19 extern void ibn_isr(void) __interrupt;
20 extern void ep0in_isr(void) __interrupt;
21 extern void ep0out_isr(void) __interrupt;
22 extern void ep1in_isr(void) __interrupt;
23 extern void ep1out_isr(void) __interrupt;
24 extern void ep2in_isr(void) __interrupt;
25 extern void ep2out_isr(void) __interrupt;
26 extern void ep3in_isr(void) __interrupt;
27 extern void ep3out_isr(void) __interrupt;
28 extern void ep4in_isr(void) __interrupt;
29 extern void ep4out_isr(void) __interrupt;
30 extern void ep5in_isr(void) __interrupt;
31 extern void ep5out_isr(void) __interrupt;
32 extern void ep6in_isr(void) __interrupt;
33 extern void ep6out_isr(void) __interrupt;
34 extern void ep7in_isr(void) __interrupt;
35 extern void ep7out_isr(void) __interrupt;
36
37 void io_init(void)
38 {
39 /* PORTxCFG register bits select alternate functions (1 == alternate function,
40 * 0 == standard I/O)
41 * OEx register bits turn on/off output buffer (1 == output, 0 == input)
42 * OUTx register bits determine pin state of output
43 * PINx register bits reflect pin state (high == 1, low == 0) */
44
45 /* PORT A */
46 PORTACFG = PIN_OE;
47 OEA = PIN_U_OE | PIN_OE | PIN_RUN_LED | PIN_COM_LED;
48 OUTA = PIN_RUN_LED | PIN_COM_LED;
49
50 /* PORT B */
51 PORTBCFG = 0x00;
52 OEB = PIN_TDI | PIN_TMS | PIN_TCK | PIN_TRST | PIN_BRKIN | PIN_RESET
53 | PIN_OCDSE;
54
55 /* TRST and RESET signals are low-active but inverted by hardware, so we clear
56 * these signals here! */
57 OUTB = 0x00;
58
59 /* PORT C */
60 PORTCCFG = PIN_WR;
61 OEC = PIN_TXD0 | PIN_WR;
62 OUTC = 0x00;
63 }
64
65 int main(void)
66 {
67 io_init();
68 usb_init();
69
70 /* Enable Interrupts */
71 EA = 1;
72
73 /* Begin executing command(s). This function never returns. */
74 command_loop();
75
76 /* Never reached, but SDCC complains about missing return statement */
77 return 0;
78 }

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)