Change the second parameter of the ser_open method from "baud" into a

"union pinfo", so the USB parameters can be passed without hacks.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1276 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2014-02-21 13:44:11 +00:00
parent 2dab4109fe
commit f80f51f6a9
16 changed files with 155 additions and 77 deletions

View File

@@ -386,6 +386,7 @@ static void butterfly_enable(PROGRAMMER * pgm)
static int butterfly_open(PROGRAMMER * pgm, char * port)
{
union pinfo pinfo;
strcpy(pgm->port, port);
/*
* If baudrate was not specified use 19200 Baud
@@ -393,7 +394,8 @@ static int butterfly_open(PROGRAMMER * pgm, char * port)
if(pgm->baudrate == 0) {
pgm->baudrate = 19200;
}
if (serial_open(port, pgm->baudrate, &pgm->fd)==-1) {
pinfo.baud = pgm->baudrate;
if (serial_open(port, pinfo, &pgm->fd)==-1) {
return -1;
}