Messages in this thread | | | Subject | Re: Accessing serial port from kernel module | From | Alan Cox <> | Date | 23 Jul 2003 15:25:43 +0100 |
| |
On Mer, 2003-07-23 at 15:15, Kurt Häusler wrote: > What is the preferred way in Linux for my module to open the serial port device such as /dev/ttyS1.
Make your driver a line discipline is the normal approach in this case (ok to be fair putting it all in user space is the normal case). Take a look at slip.c to see how slip sits above terminal interfaces.
The user space only approach is to use pty/tty pairs as things like xterm do. This gives you a "terminal/serial" device the other end of which is your user space program which can do the conversions it wants then talk to a real serial port
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |