Mail Archives: djgpp/1997/10/10/07:46:32
Eli Zaretskii wrote:
[...]
> I'd like to suggest another approach here? Since on Linux, the ``correct''
> way of accessing devices is through `ioctl' and "/dev/ttyX", why not
> add this to DJGPP? It shouldn't be too hard: all Alex has to do is to
> use the DJGPP Filesystem Extension feature. Using it, Alex will need
> to install a handler for several functions, like `open', `close',
> `ioctl', `lseek', `read' and `write', and when they reference
> "/dev/ttyX" file, redirect them to some serial code (e.g., Bills
> `bcserio' package which is available from the DJGPP archives). On
> Linux, these calls will just work as usual.
>
> That way, Alex gets a portable program, while DJGPP gets
> POSIX-compliant serial port support. And they all live happily ever
> after...
And furthermore there is on
ftp://ftp.lstm.ruhr-uni-bochum.de/pub/djgpp/fsxcom.[ch]
a probably usable template (it was bases on another serial
package) that pretty much explains how it could be done.
It would need some overhaul, but someone with knowledge how
to access ports under Linux could easily fit this to djgpp.
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -