delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/21/08:11:22

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Mon, 21 Jan 2002 15:10:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: ROLAND <roland_asmann AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Serial Communication
In-Reply-To: <20020121123528.32288.qmail@web9104.mail.yahoo.com>
Message-ID: <Pine.SUN.3.91.1020121150742.18449E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 21 Jan 2002, ROLAND wrote:

> The code is looking like this:
> 
> if((f3=open("/dev/ttya",0))==-1){ /* open device for
> read */
>      error("error: ",-1,"/dev/ttya");
>      error(" can not be opened for read",-1,"\n");
>      finish(-1);
> }
> if((f4=open("/dev/ttya",1))==-1){ /* open device for
> write */
>      error("error: ",-1,"/dev/ttya");
>      error(" can not be opened for write",-1,"\n");
>      finish(-1);
> }

That's the code which opens the I/O.  I wanted to see the code with 
settings for both handles.

> I am not sure what the settings are that are used for
> the read, but I found out that the settings used for
> write are 7-E-1 (7 bits, Even parity, 1 stopbit) and
> no flow control...
> Can someone tell me how I can figure out what the
> settings are and how to solve this problem??

You should see the settings being set in the code.  If you cannot find 
that, then it uses the default.  I think (but I am not sure) these 
settings are per device, so the input and output use the same values.

- Raw text -


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