delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/15/15:37:20

Date: Wed, 15 Sep 1999 12:00:19 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: MaCro <afontan AT mundivia DOT es>
cc: djgpp AT delorie DOT com
Subject: Re: Serial Ports
In-Reply-To: <7rmefh$cj9$1@diana.bcn.ttd.net>
Message-ID: <Pine.SUN.3.91.990915120000.27871O-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 14 Sep 1999, MaCro wrote:

> I have seen several libraries to program the serial port. My problem is that
> I want to use some sources from solaris that are using the prototypes found
> in termios.h (not termio.h), actually I need 115200 baud rate. DJGPP does
> not provide that header (only termio.h)

I'm confused.  DJGPP does not have termio.h, it has termios.h.  What
version of DJGPP are you using?

> and it does not program the ports as unix (like a file,
> ie. /dev/ttya)

Correct.  The DJGPP termios implementation currently only supports the
terminal device.  It does not support the serial port (or any other
devices).  The recommended way to add such support is to use one of
the available async communication packages in conjunction with the
DJGPP Filesystem Extensions feature.  The DJGPP FAQ has pointers to
several serial communication packages in section 22.3; the Filesystem
Extensions are described in the DJGPP library reference.

> additionally, the maximum speed is 38400 in termio.h.

You mean termios.h, right?

This is the largest baudrate because that's what most termios
implementations support.  However, once you add serial port support to
termios, you can easily add more Bnnnn constants and support them as
well.

> Well,my question is this, does anybody have to translate a program like this
> from solaris or Linux to DJGPP? (I would like to keep the sources as close
> as possible).

If you use the Filesystem Extensions, the sources will be left
unchanged.  All the magic happens on the library level; the program
doesn't know anything about that.

- Raw text -


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