added detection of InpOut32 library and support for it (supports I/O access even in Vista)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1408 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 16 years ago
parent 10178bb3c5
commit 2ba54802da

@ -1,3 +1,8 @@
2008-12-21 Kolja Waschk <kawk>
* configure.ac, src/tap/parport/direct.c: added detection of InpOut32
library and support for using it for I/O port access even under Vista
2008-12-17 Kolja Waschk <kawk>
* src/tap/discovery.c: Optional (#ifdef) printf for discovery debugging

@ -243,6 +243,45 @@ AS_IF([test "x$HAVELIBFTD2XX" = xyes], [
AC_SUBST(FTD2XXLIB)
dnl Use InpOut I/O library?
dnl http://www.highrez.co.uk/Downloads/InpOut32/default.htm
AC_ARG_WITH([inpout],
[AS_HELP_STRING([--with-inpout],
[use InpOutXX for parallel port access on Windows])],
[], [with_inpout=check])
INPOUTXX=
AS_IF([test "x$with_inpout" = xyes -o "x$with_inpout" = xcheck], [
AC_CHECK_LIB([inpout32], [Out32], [
HAVEINPOUTXX=yes
LIBS="-linpout32 $LIBS"
],[
AC_MSG_WARN([*** InpOutXX libray not found])
])
],[
AS_IF([test "x$with_inpout" != xno], [
HAVEINPOUTXX=yes
AS_IF([test -d "$with_inpout/Win32"], [
INPOUTXX="$with_inpout/Win32/inpout32.lib"
CFLAGS="$CFLAGS -I$with_inpout/Win32"
],[
INPOUTXX="$with_inpout/inpout32.lib"
CFLAGS="$CFLAGS -I$with_inpout"
])
],)
])
AS_IF([test "x$HAVEINPOUTXX" = xyes], [
AM_CONDITIONAL(HAVE_INPOUTXX, true)
AC_DEFINE(HAVE_INPOUTXX, 1, [define if you have libinpout])
],[
AM_CONDITIONAL(HAVE_INPOUTXX, false)
])
AC_SUBST(INPOUTXX)
CFLAGS="$CFLAGS -Wall"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/include"
@ -592,6 +631,11 @@ AS_IF([test ${HAVELIBFTD2XX:-no} != no], [
], [
FLAG_HAVELIBFTD2XX=no
])
AS_IF([test ${HAVEINPOUTXX:-no} != no], [
FLAG_HAVEINPOUTXX=yes
], [
FLAG_HAVEINPOUTXX=no
])
AS_IF([test ${svf:-false} != false], [
FLAG_SVF=yes
], [
@ -609,6 +653,7 @@ jtag is now configured for
Detected libusb : $FLAG_HAVELIBUSB
Detected libftdi : $FLAG_HAVELIBFTDI
Detected libftd2xx : $FLAG_HAVELIBFTD2XX
Detected inpout32 : $FLAG_HAVEINPOUTXX
Build SVF player : $FLAG_SVF
Build BSDL subsystem : $FLAG_BSDL
Bus drivers : $enabled_bus_drivers

@ -32,7 +32,14 @@
#include "parport.h"
#include "cable.h"
#if defined(HAVE_IOPERM) || defined(HAVE_I386_SET_IOPERM)
#if defined(WIN32) && defined(HAVE_INPOUTXX)
void _stdcall Out32(short PortAddress, short data);
short _stdcall Inp32(short PortAddress);
#define inb(p) Inp32(p)
#define outb(d,p) Out32(p,d)
#elif defined(HAVE_IOPERM) || defined(HAVE_I386_SET_IOPERM)
#if defined(HAVE_IOPERM)
#include <sys/io.h>

Loading…
Cancel
Save