|
The touchscreen is controlled by a serial device (COM 5) which usually is not detected during the boot process.
Therefore the following lines need to be included in a startup script. (I put them in /etc/init.d/setserial)
/bin/setserial /dev/ttyS4 autoconfig
/bin/setserial /dev/ttyS4 uart 8250 irq 5 port 0xfd68 low_latency
Thanks to Stefan Hagendorn for the hint!
In order to talk to this device an additional driver (fpit) is necessary.
You can download fpit (7.0 kb) from this site or get the current version from http://linuxslate.com/software.html
As root unpack the archive:
tar -xzf fpit_passive.tar.gz
And copy fpit_drv.o to /usr/X11R6/lib/modules/input:
cd fpit_passive/
cp fpit_drv.o /usr/X11R6/lib/modules/input/.
[In doubt refer to the included README file.]
Now the installed driver needs to be included in the /etc/X11/XFConfig file.
Open it with your favorite editor and add:
Section "InputDevice"
Identifier "mouse[0]"
Driver "fpit"
Option "Device" "/dev/ttyS4"
EndSection
In case you want to tweak the driver, there are some additional options:
Option MaximumXPosition number
Sets the maximum X position, use this to callibrate your touchscreen's right hand edge.
Option MinimumXPosition number
Sets the minimum X position, use this to callibrate your touchscreen's left hand edge.
Option MaximumYPosition number
Option MinimumYPosition number
Same as for X axis, but for Y axis.
Option InvertX
Option InvertY
Invert the specified axis.
Option SwapXY
Swap the X and Y axis.
Option Rotate CW
Option Rotate CCW
Manipulate the invert and swap options to match screen rotations.
Option DeviceName name
Sets the name of the X device.
Option AlwaysCore on
Enables the sharing of the core pointer. When this feature is enabled, the device will take control of the core pointer (and thus will emit core events) and at the same time will be able, when asked so, to report extended events. You can use the last available integer feedback to control this feature. When the value of the feedback is zero, the feature is disabled. The feature is enabled for any other value.
Option DebugLevel number
Sets the level of debugging info reported.
Option BaudRate 38400, 19200 or 9600 (default)
Changes the serial link speed.
To complete the configuration go to Section "ServerLayout" and make the following changes, so the X system uses the input device:
Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[0]" "SendCoreEvents"
InputDevice "Mouse[1]" "CorePointer"
Screen "Screen[0]"
EndSection
N.B.: I included an optional USB mouse since the touchscreen can not be defined as a core pointer.
The configuration of the USB mouse can be done by including the following in /etc/X11/XFConfig:
Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "ButtonNumber" "5"
Option "Device" "/dev/mouse"
Option "Protocol" "imps/2"
Option "ZAxisMapping" "4 5"
EndSection
After saving /etc/X11/XFConfig restart X.
If you encounter any problems check my /etc/X11/XFConfig file and/or drop me a mail.
|