openocd: src/jtag: replace the GPL-2.0-or-later license tag
[fw/openocd] / src / jtag / drivers / OpenULINK / src / main.c
index 3ea3fff1aa595bd9efab25fa266ecfe0fa744a1f..c8d4e18b094618ea7bf463a290344a1e4d4c4b1a 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;
 }