This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Parameters to ReadFile(), SetCommState() for COM ports
- From: Ronald Landheer-Cieslak <ronald at landheer dot com>
- To: vadraj kulkarni <vadiraj_kulkarni at lycos dot com>
- Cc: cygwin at cygwin dot com
- Date: Wed, 9 Jul 2003 17:37:07 +0200 (CEST)
- Subject: Re: Parameters to ReadFile(), SetCommState() for COM ports
On Wed, 9 Jul 2003, vadraj kulkarni wrote:
> This is regarding opening target in Cygwin. I have written a simple code
> which communicates with my hardware. If i am not wrong, cygwin has
> written simulation program to open com port... etc in windows. Can
> anybody tell me what all the parameters i should pass to
> CreateFile() function as well for SetComState() for COM ports.
If you want to use the Cygwin (POSIX) API to communicate with COM ports,
use the ANSI/POSIX functions on /dev/ttyS0
i.e. as Cygwin is a POSIX emulation layer, the devices it provides access
to are accessible through their UNIX named - /dev/ttyS* for COM ports.
You should use them as you would use COM ports from a UNIX application..
HTH
rlc
>
> ReadFile() function never return after receiving 2-3 packets.
>
>
> thansk & regards
> vadiraj
>
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
>
> --
> 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/
>
--
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/