]> git.sur5r.net Git - openocd/commitdiff
tcl/interface/parport: default to sane value on non-windows systems
authorPaul Fertser <fercerpav@gmail.com>
Mon, 2 Mar 2015 14:52:47 +0000 (17:52 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Tue, 14 Apr 2015 10:42:32 +0000 (11:42 +0100)
When using ppdev driver 0 is the most appropriate default value as it
corresponds to /dev/parport0. Raw port address is suitable only for
direct access (I think that's parport-giveio on windows).

Reported by danitool on IRC.

Change-Id: I983c22251de6601b433ad31aaf660fb664cee7e9
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2572
Reviewed-by: Andreas Färber <afaerber@suse.de>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
tcl/interface/parport.cfg

index f7cc23ab48cc9be2a0820ad4dcb2536a0ccc1929..ae3f8f15874e71d1ad6fabbc52bedb9c44dfdd6f 100644 (file)
@@ -7,7 +7,11 @@
 if { [info exists PARPORTADDR] } {
    set _PARPORTADDR $PARPORTADDR
 } else {
-   set _PARPORTADDR 0x378
+   if {$tcl_platform(platform) eq "windows"} {
+      set _PARPORTADDR 0x378
+   } {
+      set _PARPORTADDR 0
+   }
 }
 
 interface parport