This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[PATCH] 230.4Kbps support for serial port
- From: Troy Curtiss <tcurtiss at qcpi dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 07 Jan 2003 15:48:51 -0700
- Subject: [PATCH] 230.4Kbps support for serial port
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 Attachment:
cygwin_serial_230k4_support.patch
Description: Binary data