This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2nd Try 1.57 on Win2k or WinXP. Not more than 16 com ports. Differences between //./comX and /dev/comX


On Apr 20 09:58, Lutz H?rl wrote:
> May I additionally ask?
> - is there a reason on limiting to 16 supported serial interfaces in Cygwin?
> - if no, is it an idead to increase this number?

I don't know.  I guess it shouldn't be a problem to raise the number.

> - I used the POSIX functions read() write() and select() to communicate
>   with my serial interfaces and the Win32-API functions to set baudrate and
>   to get modem line status. It worked until now.
>   Are there hidden pitfalls ?

In theory, yes.  If the internal Cygwin datastructures keep information
about the state of the serial interface, they would be incorrect when
you manipulate the interface using native Win32 functions.  You'd have
to expect side effects.

>   Are there POSIX/Cygwin functions to do the same job ?

There are tcflow, tcdrain, itcsendbreak, tcflush, tcgetattr, ioctl and
tcsetattr calls, the latter allowing to change a lot of settings.

A clean approach is to use either Win32 functions throughout or to
use POSIX functions throughout.  Mixing them is always a bit of playing
va banque (blah ... only if you really know what you're doing ... blah)


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]