patch #6609: Using PCI parallel port cards on Windows

* ppiwin.c (ppi_open): If the port parameter passed from the
-p option is neither lpt1/2/3, try interpreting it directly as
a base address.
* avrdude.1: Document the change.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@786 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2008-11-05 20:53:51 +00:00
parent fb4637904f
commit 6904c732f4
4 changed files with 42 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2008-11-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
patch #6609: Using PCI parallel port cards on Windows
* ppiwin.c (ppi_open): If the port parameter passed from the
-p option is neither lpt1/2/3, try interpreting it directly as
a base address.
* avrdude.1: Document the change.
* doc/avrdude.texi: (Ditto.)
2008-11-04 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #22882: Erase Cycle Counter does not work for stk500v2

View File

@ -1,6 +1,6 @@
.\"
.\" avrdude - A Downloader/Uploader for AVR device programmers
.\" Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Joerg Wunsch
.\" Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008 Joerg Wunsch
.\"
.\" 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
@ -19,7 +19,7 @@
.\"
.\" $Id$
.\"
.Dd DATE July 27, 2008
.Dd DATE November 5, 2008
.Os
.Dt AVRDUDE 1
.Sh NAME
@ -413,6 +413,14 @@ serial port, the
port is the default. If you need to use a different parallel or
serial port, use this option to specify the alternate port name.
.Pp
On Win32 operating systems, the parallel ports are referred to as lpt1
through lpt3, referring to the addresses 0x378, 0x278, and 0x3BC,
respectively. If the parallel port can be accessed through a different
address, this address can be specified directly, using the common C
language notation (i. e., hexadecimal values are prefixed by
.Ql 0x
).
.Pp
For the JTAG ICE mkII, if
.Nm
has been configured with libusb support,

View File

@ -1882,7 +1882,7 @@ Windows serial port device names such as: com1, com2, etc.
@subsubsection Parallel Ports
@noindent
AVRDUDE will only accept 3 Windows parallel port names: lpt1, lpt2, or
AVRDUDE will accept 3 Windows parallel port names: lpt1, lpt2, or
lpt3. Each of these names corresponds to a fixed parallel port base
address:
@ -1903,6 +1903,9 @@ using a laptop, you might have to use lpt3 instead of lpt1. Select the
name of the port the corresponds to the base address of the parallel
port that you want.
If the parallel port can be accessed through a different
address, this address can be specified directly, using the common C
language notation (i. e., hexadecimal values are prefixed by @code{0x}).
@c
@c Node

View File

@ -2,6 +2,7 @@
* avrdude - A Downloader/Uploader for AVR device programmers
* Copyright (C) 2003, 2004, 2006
* Eric B. Weddington <eweddington@cso.atmel.com>
* Copyright 2008, Joerg Wunsch
*
* 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
@ -107,6 +108,24 @@ void ppi_open(char *port, union filedescriptor *fdp)
break;
}
}
if(fd == -1)
{
/*
* Supplied port name did not match any of the pre-defined
* names. Try interpreting it as a numeric
* (hexadecimal/decimal/octal) address.
*/
char *cp;
fd = strtol(port, &cp, 0);
if(*port == '\0' || *cp != '\0')
{
fprintf(stderr,
"%s: port name \"%s\" is neither lpt1/2/3 nor valid number\n",
progname, port);
fd = -1;
}
}
if(fd < 0)
{
fprintf(stderr, "%s: can't open device \"%s\"\n\n", progname, port);