Mail Archives: cygwin/1998/02/20/20:30:46
I noticed a problem when using the coolview cygwin.dll (634339 Nov 3
07:04) on an NT4.0 machine. It appears that calls to SetCommState
reprogram the serial chip even if the device parameters are
unchanged. Calling tcsetattr to modify the timeout parameters
(something that gdb does frequently...) can cause received data to be
scrambled.
The attached patch works round the problem by only calling
SetCommState if the device parameters have actually changed. It also
preserves the parity and stop bit settings.
I'm not sure if the handling for ERROR_OPERATION_ABORTED in ReadFile
is really appropriate; it's needed because any serial error will make
the device inaccessible until ClearCommError is called. It might be
better to simply stop the error from being generated by clearing
nstate.fAbortOnError in the tcsetattr call.
Regards
Chris
[ATTACHMENT /usr/algor/chris/fhandler.cc.diffs, application/octet-stream]
--
Chris Dearman, Algorithmics Ltd, 3 Drayton Park, London, N5 1NU, England
Phone: +44 171 700 3301 FAX: +44 171 700 3400 Email: chris AT algor DOT co DOT uk
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -