tcl/interface: add SPDX tag
[fw/openocd] / tcl / interface / parport.cfg
index 2a2668d520289732b83423d297b980863f393e2a..b9fceeb852b034aff152e4237283baf2739f2c3d 100644 (file)
@@ -1,8 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+#
+# Parallel port wiggler (many clones available) on port 0x378
 #
-# Parallel port wiggler (many clones available) on port 0xc8b8
+# Addresses: 0x378/LPT1 or 0x278/LPT2 ...
 #
 
-interface parport
-parport_port 0xc8b8
-parport_cable wiggler
+if { [info exists PARPORTADDR] } {
+   set _PARPORTADDR $PARPORTADDR
+} else {
+   if {$tcl_platform(platform) eq "windows"} {
+      set _PARPORTADDR 0x378
+   } {
+      set _PARPORTADDR 0
+   }
+}
 
+adapter driver parport
+parport port $_PARPORTADDR
+parport cable wiggler