[PATCH] 230.4Kbps support for serial port
Troy Curtiss
tcurtiss@qcpi.com
Tue Jan 7 22:49:00 GMT 2003
Hi,
Attached is a patch that enables cygwin to talk at 230400 bps on serial
ports that support the higher rate. It also does the necessary
error-checking to confirm whether or not a given port is capable of
extended bitrates. I added B230400 (for Posix) and CBR_230400 (for Win32)
definitions to the appropriate header files (termios.h and winbase.h,
respectively). I've been testing for a couple days now and it appears to
work as designed. (We use a lot of extended bitrate devices at work,
mostly with Win32 code - so this simply brings the paradigm across to the
posix side of the house.)
Question: Upon failure (ie. trying to configure a non-230.4K capable port
to talk 230.4K), I simply return -1... I'm not sure whether POSIX would
set errno = EINVAL or not... either way is fine.
Let me know if you have any questions, otherwise it sure would be nice
to roll this in if possible :) Thanks,
-Troy
Changelog entry:
2003-01-06 Troy Curtiss <troyc@usa.net>
* fhandler_serial.cc (fhandler_serial::tcsetattr):
Add support and capability checking for B230400 bitrate
* fhandler_serial.cc (fhandler_serial::tcgetattr):
Add support for B230400 bitrate
* /cvs/src/src/winsup/w32api/include/winbase.h:
Add CBR_230400 definition for Win32 support of 230.4Kbps
* /cvs/src/src/winsup/cygwin/include/sys/termios.h:
Add B230400 definition for Posix support of 230.4Kbps
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin_serial_230k4_support.patch
Type: application/octet-stream
Size: 2602 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20030107/f20fff45/attachment.obj>
More information about the Cygwin-patches
mailing list