How to write a new line discipline?
Daniel O'Connor
doconnor at gsoft.com.au
Mon Mar 15 21:59:11 PST 2004
Hi,
My company uses RS485 to talk to various pieces of hardware, and currently to
do this we have a hacked up copy of sio which talks to a conventional RS485
card, while this works well it would be nicer to be able to use different 485
cards via the puc driver instead of having to use a custom driver. Our custom
driver only understands 8250/16550/etc UARTS which is another limitation (not
currently an issue though :)
It was suggested a while ago by phk (I think..) that a line discipline would
be the best approach, and I think this makes sense. The protocol in question
uses the parity bit as a 9th bit to signal an address byte (only 256
addresses on this bus). I can't see how a line discipline can directly
control and read the parity information, and to set various control lines
(specifically RTS) to switch the transceiver into transmit mode when
necessary.
The current disciplines seem to be either very very old, or 'hacks' for things
like PPP or SLIP :(
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5
More information about the freebsd-hackers
mailing list