Only in avrdude-5.10.inpout: .deps
Only in avrdude-5.10.inpout: Makefile
Only in avrdude-5.10.inpout: ac_cfg.h
Only in avrdude-5.10.inpout: avrdude.conf
Only in avrdude-5.10.inpout: avrdude.conf.tmp
Only in avrdude-5.10.inpout: config.log
Only in avrdude-5.10.inpout: config.log.txt
Only in avrdude-5.10.inpout: config.status
Only in avrdude-5.10.inpout/doc: Makefile
Only in avrdude-5.10.inpout: inpout.a
Only in avrdude-5.10.inpout: inpout.def
Only in avrdude-5.10.inpout: inpout32.dll
Only in avrdude-5.10.inpout: libinpout.a
diff -crB avrdude-5.10/main.c avrdude-5.10.inpout/main.c
*** avrdude-5.10/main.c	Tue Jan 19 12:39:12 2010
--- avrdude-5.10.inpout/main.c	Thu Jul 15 20:54:55 2010
***************
*** 56,61 ****
--- 56,64 ----
  #include "safemode.h"
  #include "update.h"
  
+ #if defined (WIN32NATIVE)
+ 	extern int use_inpout;
+ #endif
  
  /* Get VERSION from ac_cfg.h */
  char * version      = VERSION;
***************
*** 121,126 ****
--- 124,132 ----
   "  -Y <number>                Initialize erase cycle # in EEPROM.\n"
   "  -v                         Verbose output. -v -v for more.\n"
   "  -q                         Quell progress output. -q -q for less.\n"
+ #if defined (WIN32NATIVE) 
+  "  -a                         Use inpout32 instead of giveio for parallel port access\n"
+ #endif 
   "  -?                         Display this usage.\n"
   "\navrdude version %s, URL: <http://savannah.nongnu.org/projects/avrdude/>\n"
            ,progname, version);
***************
*** 352,357 ****
--- 358,366 ----
    safemode      = 1;       /* Safemode on by default */
    silentsafe    = 0;       /* Ask by default */
    is_open       = 0;
+ #if defined (WIN32NATIVE)  
+   use_inpout 	= 0;	/* try to use giveio driver by default */
+ #endif
  
    if (isatty(STDIN_FILENO) == 0)
        safemode  = 0;       /* Turn off safemode if this isn't a terminal */
***************
*** 400,408 ****
    /*
     * process command line arguments
     */
!   while ((ch = getopt(argc,argv,"?b:B:c:C:DeE:Fi:np:OP:qstU:uvVx:yY:")) != -1) {
  
      switch (ch) {
        case 'b': /* override default programmer baud rate */
          baudrate = strtol(optarg, &e, 0);
          if ((e == optarg) || (*e != 0)) {
--- 409,422 ----
    /*
     * process command line arguments
     */
!   while ((ch = getopt(argc,argv,"?ab:B:c:C:DeE:Fi:np:OP:qstU:uvVx:yY:")) != -1) {
  
      switch (ch) {
+ #if defined (WIN32NATIVE)	
+ 	   case 'a':
+ 			use_inpout = 1;
+ 	   break;
+ #endif	
        case 'b': /* override default programmer baud rate */
          baudrate = strtol(optarg, &e, 0);
          if ((e == optarg) || (*e != 0)) {
diff -crB avrdude-5.10/ppiwin.c avrdude-5.10.inpout/ppiwin.c
*** avrdude-5.10/ppiwin.c	Tue Jan 19 12:39:12 2010
--- avrdude-5.10.inpout/ppiwin.c	Fri Jul 16 00:15:35 2010
***************
*** 69,75 ****
--- 69,109 ----
  };
  
  
+ HANDLE h_inpout = NULL;
+ int use_inpout;
  
+ void	Out32(short PortAddress, short data);
+ short	Inp32(short PortAddress);
+ int		IsInpOutDriverOpen();  //Returns TRUE if the InpOut driver was opened successfully
+ 
+ int IsInpOutDriverOpen()
+ {
+ 	int (_stdcall *p)() = NULL;
+ 
+ 	p = (int (_stdcall *)())GetProcAddress(h_inpout, "IsInpOutDriverOpen");
+ 	
+ 	return (*p)();
+ } 
+ 
+ void Out32(short PortAddress, short data)
+ {
+ 	void (_stdcall *p)(short, short) = NULL;
+ 
+ 	p = (void (_stdcall *)(short, short))GetProcAddress(h_inpout, "Out32");
+ 	
+ 	(*p)(PortAddress, data);
+ 	
+ 	return;
+ }
+ 
+ short Inp32(short PortAddress)
+ {	
+ 	short (_stdcall *p)(short) = NULL;
+ 
+ 	p = (short (_stdcall *)(short))GetProcAddress(h_inpout, "Inp32");
+ 	
+ 	return (*p)(PortAddress);
+ }
  
  
  /* FUNCTION PROTOTYPES */
***************
*** 92,99 ****
  
      if(fd < 0)
      {
!         fprintf(stderr, "%s: can't open device \"giveio\"\n\n", progname);
!         fdp->ifd = -1;
          return;
      }
  
--- 126,137 ----
  
      if(fd < 0)
      {
! 		if(use_inpout)
! 			fprintf(stderr, "%s: can't open device \"InpOut\"\n\n", progname);
! 		else
! 			fprintf(stderr, "%s: can't open device \"giveio\"\n\n", progname);
! 
! 		fdp->ifd = -1;
          return;
      }
  
***************
*** 136,144 ****
      fdp->ifd = fd;
  }
  
- 
  #define DRIVERNAME      "\\\\.\\giveio"
! static int winnt_pp_open(void)
  {
      // Only try to use giveio under Windows NT/2000/XP.
      OSVERSIONINFO ver_info;
--- 174,181 ----
      fdp->ifd = fd;
  }
  
  #define DRIVERNAME      "\\\\.\\giveio"
! static int winnt_pp_open_giveio(void)
  {
      // Only try to use giveio under Windows NT/2000/XP.
      OSVERSIONINFO ver_info;
***************
*** 172,189 ****
              CloseHandle(h);
          }
      }
      return(0);
  }
  
  
  
  
! void ppi_close(union filedescriptor *fdp)
  {
      return;
  }
  
  
  
  /*
   * set the indicated bit of the specified register.
--- 209,267 ----
              CloseHandle(h);
          }
      }
+ 	
      return(0);
  }
  
+ static int winnt_pp_open_inpout32(void)
+ {
+ 	h_inpout = LoadLibrary("inpout32.dll");
+ 
+ 	if(h_inpout == NULL)
+ 	{
+ 		fprintf(stderr, "%s: inpout32.dll not found !\n\n", progname);
+ 
+ 		return(-1);
+ 	}
+ 	
+ 	//check that we successfully opened the driver.
+ 	if(!IsInpOutDriverOpen())
+ 	{
+ 		fprintf(stderr, "%s: InpOut driver not opened. Try to install it.\n\n", progname);
  
+ 		return(-1);
+ 	}
+ 	
+ 	return(0);
+ }
  
+ static int winnt_pp_open(void)
+ {
+ 	if(use_inpout)
+ 		return winnt_pp_open_inpout32();
+ 	/*else*/
+ 		return winnt_pp_open_giveio();
+ }
  
! void ppi_close_giveio(union filedescriptor *fdp)
  {
      return;
  }
  
+ void ppi_close_inpout32(union filedescriptor *fdp)
+ {
+ 	CloseHandle(h_inpout);
+ 	
+ 	h_inpout = NULL;
+ }
  
+ void ppi_close(union filedescriptor *fdp)
+ {
+ 	if(use_inpout)
+ 		ppi_close_inpout32(fdp);
+ 	else
+ 		ppi_close_giveio(fdp);
+ }
  
  /*
   * set the indicated bit of the specified register.
***************
*** 317,339 ****
  /* Read in value from port. */
  static unsigned char inb(unsigned short port)
  {
!     unsigned char t;
      
! 	asm volatile ("in %1, %0"
!         : "=a" (t)
!         : "d" (port));
      
! 	return t;
! }
  
  
  /* Write value to port. */
  static void outb(unsigned char value, unsigned short port)
  {
!     asm volatile ("out %1, %0"
!         :
!         : "d" (port), "a" (value) );
! 
      return;
  }
  
--- 395,427 ----
  /* Read in value from port. */
  static unsigned char inb(unsigned short port)
  {
! 	if(use_inpout)
! 		return (unsigned char)Inp32(port);
! 	else
! 	{
! 		unsigned char t;
      
! 		asm volatile ("in %1, %0"
! 			: "=a" (t)
! 			: "d" (port));
      
! 		return t;
! 	}
! }	
  
  
  /* Write value to port. */
  static void outb(unsigned char value, unsigned short port)
  {
! 	if(use_inpout)
! 		Out32(port, value);
! 	else
! 	{
! 		asm volatile ("out %1, %0"
! 			:
! 			: "d" (port), "a" (value) );
! 	}
! 	
      return;
  }
  
Only in avrdude-5.10.inpout: ppiwin.orig.c
Only in avrdude-5.10.inpout: stamp-h1
Only in avrdude-5.10.inpout/windows: .deps
Only in avrdude-5.10.inpout/windows: Makefile
Only in avrdude-5.10.inpout/windows: inpout.a
Only in avrdude-5.10.inpout: windows_inpout
