openocd: fix SPDX tag format for files .c
[openocd.git] / src / jtag / drivers / OpenULINK / src / main.c
index 3ea3fff1aa595bd9efab25fa266ecfe0fa744a1f..51d3a3b94726eaaa0e9a500595512d88f0f4b911 100644 (file)
@@ -1,26 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /***************************************************************************
  *   Copyright (C) 2011 by Martin Schmoelzer                               *
  *   <martin.schmoelzer@student.tuwien.ac.at>                              *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 
 #include "main.h"
 
-#include "shorttypes.h"
 #include "io.h"
 #include "usb.h"
 #include "protocol.h"
@@ -50,43 +36,43 @@ extern void ep7out_isr(void)   __interrupt;
 
 void io_init(void)
 {
-  /* PORTxCFG register bits select alternate functions (1 == alternate function,
-   *                                                    0 == standard I/O)
-   * OEx register bits turn on/off output buffer (1 == output, 0 == input)
-   * OUTx register bits determine pin state of output
-   * PINx register bits reflect pin state (high == 1, low == 0) */
+       /* PORTxCFG register bits select alternate functions (1 == alternate function,
+        *                                                    0 == standard I/O)
+        * OEx register bits turn on/off output buffer (1 == output, 0 == input)
+        * OUTx register bits determine pin state of output
+        * PINx register bits reflect pin state (high == 1, low == 0) */
 
-  /* PORT A */
-  PORTACFG = PIN_OE;
-  OEA = PIN_U_OE | PIN_OE | PIN_RUN_LED | PIN_COM_LED;
-  OUTA = PIN_RUN_LED | PIN_COM_LED;
+       /* PORT A */
+       PORTACFG = PIN_OE;
+       OEA = PIN_U_OE | PIN_OE | PIN_RUN_LED | PIN_COM_LED;
+       OUTA = PIN_RUN_LED | PIN_COM_LED;
 
-  /* PORT B */
-  PORTBCFG = 0x00;
-  OEB = PIN_TDI | PIN_TMS | PIN_TCK | PIN_TRST | PIN_BRKIN | PIN_RESET
-      | PIN_OCDSE;
+       /* PORT B */
+       PORTBCFG = 0x00;
+       OEB = PIN_TDI | PIN_TMS | PIN_TCK | PIN_TRST | PIN_BRKIN | PIN_RESET
+               | PIN_OCDSE;
 
-  /* TRST and RESET signals are low-active but inverted by hardware, so we clear
-   * these signals here! */
-  OUTB = 0x00;
+       /* TRST and RESET signals are low-active but inverted by hardware, so we clear
+        * these signals here! */
+       OUTB = 0x00;
 
-  /* PORT C */
-  PORTCCFG = PIN_WR;
-  OEC = PIN_TXD0 | PIN_WR;
-  OUTC = 0x00;
+       /* PORT C */
+       PORTCCFG = PIN_WR;
+       OEC = PIN_TXD0 | PIN_WR;
+       OUTC = 0x00;
 }
 
 int main(void)
 {
-  io_init();
-  usb_init();
+       io_init();
+       usb_init();
 
-  /* Enable Interrupts */
-  EA = 1;
+       /* Enable Interrupts */
+       EA = 1;
 
-  /* Begin executing command(s). This function never returns. */
-  command_loop();
+       /* Begin executing command(s). This function never returns. */
+       command_loop();
 
-  /* Never reached, but SDCC complains about missing return statement */
-  return 0;
+       /* Never reached, but SDCC complains about missing return statement */
+       return 0;
 }

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)