| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | serial port interaction |
| From: | chus <chus73 AT undominio DOT es> |
| Message-ID: | <Xns95CDC7F0584F6serialport@62.81.237.233> |
| User-Agent: | Xnews/5.04.25 |
| Lines: | 22 |
| Date: | Tue, 28 Dec 2004 18:51:14 GMT |
| NNTP-Posting-Host: | 80.103.13.201 |
| X-Complaints-To: | abuse AT eresmas DOT com |
| X-Trace: | news-reader.eresmas.com 1104259874 80.103.13.201 (Tue, 28 Dec 2004 19:51:14 MET) |
| NNTP-Posting-Date: | Tue, 28 Dec 2004 19:51:14 MET |
| Organization: | eresMas |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
(sorry if I am posting a known issue)
I am porting linux C codes to DJGPP/windows. Migration has not been very
difficult except for one of the modules that reads/writes from/to serial
port (/dev/ttyS* -> COM*). Linux version opens the port (fd =
open("/dev/ttyS0") and then use read() and write() to receive and send
data.
I rewrote open, send and receive functions using bioscom(...). Opening and
writing functions work fine, however reading justs gets the last character
received by the serial port.
I have seen (and test) programs using Win32API/dev-cpp (SetupComm ...) that
interact with serial port like a regular file. I'm looking for similar
functions with djgpp. Is it possible to read a stream of bytes received by
the serial port, not just a single one?
Thanks in advance
PD: I dont know if pmcom could be a solution. I tried to compile it, but it
failed.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |