lkml.org 
[lkml]   [2007]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to access correctly serial port inside module?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I asked vojtech@suse.cz as one of the driver developer

this is how I did it (just prototype, with implicite line discipline)

(neccessary just one folder and two files)
1. copy template linux-source/drivers/input/joystick/magellan.c
2. insert in line 90 :
printk("%s:\"%s\"\n",__FUNCTION__, data);
3. make and insert it
4. inputattach --magellan /dev/ttyS0 &
5. date > /dev/ttyS0
6. dmesg | tail

voilà!

[output von dmesg]

[27336.486980] serio: Serial port ttyS0
[27336.487270] input: LogiCad3D Magellan / SpaceMouse as
/class/input/input6 [27336.518603] magellan_process_packet:"Mi 6 Jun
19:22:31 CEST 2007"

[/output]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - GPGrelay v0.959

iD8DBQFGaIZbAAomYJ1taN8RAsMLAKDC1+OjCj+herKBXCNBknSu0K+uaACffNtk
Pdo0NVAjdBapHtg38m0u6Aw=
=DEP0
-----END PGP SIGNATURE-----
begin:vcard
fn:Lars K.W. Gohlke
n:Gohlke;Lars K.W.
email;internet:lkwg82@gmx.de
x-mozilla-html:FALSE
version:2.1
end:vcard

\
 
 \ /
  Last update: 2007-06-08 00:31    [W:0.066 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site