mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
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:
19
ppiwin.c
19
ppiwin.c
@@ -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);
|
||||
|
Reference in New Issue
Block a user