Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>,
	<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-ID: <37C0F23A.A17B6C1@tbit.dk>
Date: Mon, 23 Aug 1999 09:03:22 +0200
From: Kim Poulsen <kpo@tbit.dk>
Organization: Ericsson Telebit A/S
X-Mailer: Mozilla 4.61 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
CC: cygwin@sourceware.cygnus.com
Subject: Re: Serial port programming
References: <37C0EAC4.63151D86@tbit.dk> <199908230653.IAA17307@mailhostnew.tbit.dk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

It would seem that I can open the files called /dev/com2, /dev/ttyS1,
and com2 but I cannot read or write (with fopen(..., "rw");) from the
file. Why might that be so?  The program core dumps with an
STATUS_ACCESS_VIOLATION error on the fgetc() or fputc() command.

Baron Shatturday wrote:
> >  I've got the following problem: I need to access the serial ports of
> >my PC through an ANSI C program.  How do I do that ?  I have already
> >tried using fopen("/dev/com2", "r")
> Have you tried using ("/dev/ttyS1", "r")?
> Just a thought...

-- 
 Kim Poulsen, B.Sc.E.E, System Developer HW
 Ericsson Telebit A/S     Tel: + 45 86 28 81 76
 Fabriksvej 11            Fax: + 45 86 28 81 86
 DK-8260 Viby J           E-mail: info@tbit.dk
 Denmark                  URL: http://www.tbit.dk/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

