This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Serial programming
- To: cygwin-patches at sources dot redhat dot com
- Subject: Serial programming
- From: Jacek Trzcinski <jacek at certum dot pl>
- Date: Wed, 23 May 2001 14:35:25 +0200
- Reply-To: jacek at certum dot pl
Hi,
I have created patch to serial device which implements ioctl function
allowing
manipulate RTS and DTR line and reading modem lines. I will send it when
I sign copyright
assignment form.
I didn't do two things in my patch about I would like discuss here.
First remarks I shared
with Corinna Vinschen and She suggested send e-mail here.
1) To read input queue there should be use constant
FIONREAD (information taken from different sources) but cygwin occupy it
for
socket software !(it is macro). Constant TIOCINQ I have taken from linux
where it is equal FIONREAD(FIONREAD is not occupied in linux like in
cygwin). As Corinna remarked, this macro
expands to a constant expression but including asm/socket.h in serial
programming seems to make not much sense. She suggested (I support her)
to create asm/ioctls.h file like in Linux.
2) Next matter concerns device name convention. In cygwin one may use
/dev/com1 or /dev/ttyS1 and so on. (what for is utilizing /dev/comx
devices I do not
know - it is not portable to linux).
I think also that number of devices should start from 0 not from 1 thus
devices shold be
numbered /dev/ttyS0, /dev/ttyS1 and so on like in linux because again it
is not portable.
Somebody who had access to /dev/ttyS0 in linux will have not in cygwin !
Best regards
Jacek