[Prev][Next][Index][Thread]

how can I select a serial port?



Hi, 

May I ask a question regarding to the serial I/O driver in OSKit?

I am porting a serial port access library in OpenBSD to OSKit-0.97.
So far I am successful, I basically replaced UNIX syscalls on
/dev/tty** with functions on ttystream in OSKit (in libfreebsd_dev.a),
e.g., 

   open("/dev/tty01", O_RDWR, 0)
=> oskit_ttydev_open(ttydev[1], OSKIT_O_RDWR, &ttystrm)

However, I am stuck with porting the select() syscall.  select()
selects a set of file descriptors.  In OSKit, ttystream I open does
not have a file descriptor (because it is not a file!), so I cannot
use select() on it.  Is there any internal function to select
ttystreams in OSKit?  Or should I write a new one with ioctl()?  Or
can I open a serial port as a file? 

Thank you very much. 


--
Naomaru Itoi <itoi@eecs.umich.edu>
Ph.D. candidate / GSRA
http://www-personal.engin.umich.edu/~itoi/
Center for Information Technology Integration, University of Michigan
http://www.citi.umich.edu/
=================================
To subscribe or unsubscribe, send mail with "subscribe" or "unsubscribe"
to oskit-users-request@flux.cs.utah.edu.  The oskit-announce list is low
volume - if you want to subscribe, mail oskit-announce-request@flux.cs.utah.edu