Skip to content

Commit

Permalink
Submitted by Gerard:
Browse files Browse the repository at this point in the history
patch #6828: Using arbitrary BAUD rates
* ser_posix.c (serial_baud_lookup): Allow non-standard baud
rates.
* ser_win32.c (serial_baud_lookup): (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@890 81a1dc3b-b13d-400b-aceb-764788c761c2
  • Loading branch information
joerg_wunsch committed Jan 8, 2010
1 parent ddb0a6e commit cf29a42
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2010-01-08 Joerg Wunsch <[email protected]>

Submitted by Gerard:
patch #6828: Using arbitrary BAUD rates
* ser_posix.c (serial_baud_lookup): Allow non-standard baud
rates.
* ser_win32.c (serial_baud_lookup): (Dito.)

2010-01-07 Joerg Wunsch <[email protected]>

Submitted by Eric Trein:
Expand Down
12 changes: 9 additions & 3 deletions ser_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,15 @@ static speed_t serial_baud_lookup(long baud)
map++;
}

fprintf(stderr, "%s: serial_baud_lookup(): unknown baud rate: %ld\n",
progname, baud);
exit(1);
/*
* If a non-standard BAUD rate is used, issue
* a warning (if we are verbose) and return the raw rate
*/
if (verbose > 0)
fprintf(stderr, "%s: serial_baud_lookup(): Using non-standard baud rate: %ld",
progname, baud);

return baud;
}

static int ser_setspeed(union filedescriptor *fd, long baud)
Expand Down
12 changes: 9 additions & 3 deletions ser_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,15 @@ static DWORD serial_baud_lookup(long baud)
map++;
}

fprintf(stderr, "%s: serial_baud_lookup(): unknown baud rate: %ld",
progname, baud);
exit(1);
/*
* If a non-standard BAUD rate is used, issue
* a warning (if we are verbose) and return the raw rate
*/
if (verbose > 0)
fprintf(stderr, "%s: serial_baud_lookup(): Using non-standard baud rate: %ld",
progname, baud);

return baud;
}


Expand Down

0 comments on commit cf29a42

Please sign in to comment.