Writing Touchscreen calibration utility
Tristan Van Berkom
vantr at touchtunes.com
Fri Sep 17 07:29:32 PDT 2004
Sergei Mutovkin wrote:
[...]
> After googling a bit more it seems that it is impossible to unload and
> load drivers on the fly in X... :(
>
> Tristan, was your calibration utility closed source?
Unfortunatly, I am bound by nda, but trust me it was a hack
and unworthy of the OSS world ;-)
> I think that named pipe will be my only approach. The only other
> choice, which seems to be quite difficult, is to create a duplicate
> ttyS in kernel and read it normally.
Just looked at the libc wrapper, you can use `mknod()' to create
a file of type `S_IFIFO' and it will pass through the wrapper code
so it's got to be "supported", You'll still need to patch xf86_libc.h
and libc_wrapper.c to handle a more complete list of mode flags
(mainly O_NDELAY) in `xf86open()' if you want non-blocking IO.
OTOH, you might be able to get away with useing blocking IO, if you
use `xf86WaitForInput()' from posix_tty.c...
> Something else that might be also be reqired to do is to use a 2nd
> configuration file for use only by EloTouch X driver an it will
> re-read configuration from it...
I used a binary file for this, so I am unaware about modifying the
XF86Config (or the XORGConfig or whatever), but I'm sure that you
can find examples in programs that configure X.
Cheers,
-Tristan
More information about the xorg
mailing list