- To: ecos-discuss@xxxxxxxxxxxxxxxxxxx
- Subject: file descriptors and handles for serial
- From: Stanislav Meduna <stano@xxxxxxxxxx>
- Date: Wed, 14 Sep 2011 13:53:15 +0200
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Lightning/1.0b2 Thunderbird/3.1.14
Hi,
I have a code using the serial port where I am using
cyg_io_set/get_config(), that are operating with handles.
Now I'd like to use a select() call that needs
a filedescriptor.
- Should I use cyg_fp_get() to get a handle from a file
descriptor describing a device (apropos, shouldn't
dev_open() in fileio\current\src\devfs.cxx set the f_type
to CYG_FILE_TYPE_DEVICE instead of _FILE?)
- or is there a way to control everything controllable by
cyg_io_set_config using an ioctl?
I know I can rewrite the code to use cyg_io_read and aborting
a timed out read via a set_config; the problem is that the
code I am hacking is part of an abstraction only storing
one number for both sockets and serial ports. Mixing
descriptors and handles and marking what is what would make
the code quite ugly.
Thanks
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
[Linux Embedded]
[U-Boot V2]
[Linux Kernel]
[Linux MIPS]
[Linux ARM]
[Linux for the Blind]
[Linux Resources]
[Photo]
[Yosemite]
[ISDN Cause Codes]
[ECOS Home]
[Site Home]