delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/20/04:58:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 20 Apr 2004 10:57:36 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 2nd Try 1.57 on Win2k or WinXP. Not more than 16 com ports. Differences between //./comX and /dev/comX
Message-ID: <20040420085736.GC26840@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <C2F0FC2A5C4B3E44ADF4327E699486A509F52B AT mail2 DOT de DOT thorlabs DOT local>
Mime-Version: 1.0
In-Reply-To: <C2F0FC2A5C4B3E44ADF4327E699486A509F52B@mail2.de.thorlabs.local>
User-Agent: Mutt/1.4.2i

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 AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019