This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

file descriptors and handles for serial


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]