Need help with serial line device driver

Steve Dyer dyer at arktouros.MIT.EDU
Sat Oct 22 01:44:26 AEST 1988


In article <4886 at b-tech.ann-arbor.mi.us> zeeff at b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
>>You want to define a new TTY line discipline which will make the
>>bytes available to your IP input routine.  This is what's done
>
>I think he is trying to avoid having or writing the tty driver source.
>Can a kernel routine call ttyopen() and ttyread()?  Ar there any PD
>tty drivers for Xenix (or Microport)?

You don't need tty driver source to write a new line discipline.
That's the whole purpose of line disciplines, after all.  You
write your line discipline, add the correct entries to the master
file, and then build a new kernel.

The ttyread and ttywrite routines are assuming transfers to/from
user space, so won't work as you'd like.  A line discipline (or
a STREAMS module if/when we have STREAMS serial devices) is really
the only way to go.  Trying to do what you suggest is as hard, if
not harder, than doing it right.

---
Steve Dyer
dyer at arktouros.MIT.EDU
dyer at spdcc.COM aka {harvard,husc6,ima,bbn,m2c,mipseast}!spdcc!dyer



More information about the Comp.unix.wizards mailing list