If the stk500 is being used, default to using the first serial port.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@167 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2002-12-07 15:16:24 +00:00
parent 9443e6d12d
commit df4576d14d
2 changed files with 14 additions and 7 deletions

View File

@ -45,7 +45,7 @@
.Op Fl m Ar memtype .Op Fl m Ar memtype
.Op Fl o Ar filename .Op Fl o Ar filename
.Op Fl n .Op Fl n
.Op Fl P Ar parallel .Op Fl P Ar port
.Op Fl t .Op Fl t
.Op Fl v .Op Fl v
.Op Fl V .Op Fl V
@ -298,12 +298,14 @@ to write to
.It Fl P Ar port .It Fl P Ar port
Use Use
.Ar port .Ar port
as the to identify the device to which the programmer is attached. By
.Xr ppi 4 default the
device to communicate with, instead of the default .Pa /dev/ppi0
.Pa /dev/ppi0 . port is used, but if the programmer type normally connects to the
If you are using the STK500 programmer, use this option to specify serial port, the
which serial port to use. .Pa /dev/cuaa0
port is the default. If you need to use a different parallel or
serial port, use this option to specify the alternate port name.
.It Fl t .It Fl t
Tells Tells
.Nm .Nm

View File

@ -515,6 +515,11 @@ int main(int argc, char * argv [])
switch (ch) { switch (ch) {
case 'c': /* pin configuration */ case 'c': /* pin configuration */
pinconfig = optarg; pinconfig = optarg;
if (strcmp(pinconfig, "stk500") == 0) {
if (port == DEFAULT_PARALLEL) {
port = DEFAULT_SERIAL;
}
}
break; break;
case 'C': /* pin configuration file */ case 'C': /* pin configuration file */