lkml.org 
[lkml]   [2003]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Accessing serial port from kernel module
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.036 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site