lkml.org 
[lkml]   [2000]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Accessing serial ports from a loadable module (from kernel space)


Perhaps get minicom source code (the telix alike) that will have the
details what you are looking for.

Martin
PD1AJE


On Mon, 21 Feb 2000, [iso-8859-1] Jörgen Overgaard wrote:

> Hi,
>
> I'm relatively new to the concept of writing loadable drivers (modules) for Linux.
> I'm trying to write a driver that will control some hardware via the serial port. (radios, etc)
>
> I've come so far as the driver can be read from and written to. It handles all the neccesary processing needed before
> passing it on to the serial port. That's where my problem arrives.
> How can I access (for example /dev/ttyS0 from kernel space)
> Since I cannot use standard libraries and running within kernel space, I can't just access them usuall way
> with open("/dev/ttyS0", O_RDWR), etc,etc.
>
> I found some info (and trying to studie some existing char drivers in kernel source) that could be a trail in the right direction.
> tty_open() etc....
>
> It get's a bit frustrating when I've come this far.
> I've tried to search the net for info,but eitherway I'm searching wrong,or there is no info (at least not very informant).
>
> Anyone out there with knowlage about accessing the serial ports from kernel space??
>
> Thanks!
> 73 de SM4WWG / Jörgen Overgaard
>
> Jörgen Overgaard
> IT-Manager
> Naxos Sweden AB
> Kryptongatan 6
> S-703 74 ÖREBRO
> SWEDEN
> Tel: +46 (0)19 20 68 60 Fax: +46 (0)19 20 68 65
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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