Need some help getting a touchscreen working...
Joshua Smith <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm trying to get a USB IR Touchscreen working, and I need some help
filling some gaps in my understanding of how everything works
together. This might actually be an XFree86 question, but I figured
I'd start at the bottom of the stack, and hopefully you call can help
me work my way up to the right experts.
I'm using Slackware, with the 2.6.20 Kernel. (Strictly speaking, I'm
only using Slackware to build, and I'm actually deploying SLAX with
that kernel booting off a USB flash drive.) I'm running X with twm.
I have driver source code from the manufacturer, which was apparently
written for an earlier version of the kernel, judging from this
method signature:
static void unitouchusb_irq(struct urb *urb, struct pt_regs *regs)
By referring to the usbtouchscreen.c source, I was able to pretty
easily modify the vendor's sources such that they compile, and the
drivers basically work now (touching the screen does move the mouse
pointer around).
The drivers take a bunch of module params for calibration, and
translate the raw signals into calls like:
input_report_abs(unitouch->input, ABS_X, translatedX);
What I'm trying to understand is how the value passed as ABS_X
eventually turns into a mouse pointer position in X Windows.
Somewhere along the way it is getting normalized against values that
were passed to input_set_abs_params, and then that fractional value
eventually gets scaled to screen coordinates. But something is going
awry in this process: over time, the same value passed to
input_report_abs is resulting in different mouse pointer positions.
What I *think* is happening, is that X has some sort of virtual
screen center, which gets moved (perhaps by reporting ABS_X values
which are close to the min/max provided to set_abs_params?).
Can someone here explain what's happening?
(Note: My xorg.conf file doesn't mention USB at all:
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Should it? A USB mouse plugged in to the same system is working fine.)
Thanks in advance!!!
-Joshua
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel