There are three kernel modules support USB eGalax Touch device
1. inbult usbhid module for HID touch device
2. Inbult usbtouchscreen module for non-HID touch device
3. eGalax Touch tkusb module for both HID and non-HID touch devices
Item 3 is not in consideration list for inbuilt modules in kernel being more convenient. Usbhid and usbtouchscreen conflict and I use usbhid finally.
As for the application interface, there are X11 and tslib. X11 is too big and often is used on desktop. tslib is a thin software interface and ready for Qt. I decide to focus on tslib.
Step 1. Root File System with tslib
Make sure tslib in buildroot has been checked. Find the eGalax plugin patch from
http://repository.timesys.com/buildsources/t/tslib/tslib-1.0/
I modify and combined to 4 patches.
tslib-1.0-A1_svn_updates-r50-r78.patch, tslib-1.0-Z4_egalax.patch, tslib-1.0-no-cxx.patch, tslib_add_finddef_and_inputattach_utils.patch
Notice that patches are used by alphabetic sequence.
Step 2. Linux Kernel with usbhid
Follow the menuconfig on kernel,
(Notice that USB Touch Driver has to be unchecked.)
$ Make menuconfig
Device Drivers --->
Input device support --->
<*> Event interface
// [*]Touchscreens --->
// <*>USB Touch Driver
HID Devices <---(Handy: Try All to Yes)
[*] /dev/hidraw raw HID device support
[*] /dev/hiddev raw HID device support
Step 3. test tslib
Make sure /dev/input/event0, /dev/hidraw0 is there.
Test by
# export TSLIB_TSDEVICE=/dev/input/event0
# export TSLIB_FBDEVICE=/dev/fb0
# vi /etc/ts.conf
module_raw input
module_raw galax
# ts_calibrate
# ts_test
Step 4. Qt with qt-mouse-tslib
[Host]
$ ./configure -embedded arm -xplatform qws/linux-arm-g++ -qt-mouse-tslib
$ make
//deploy to Target
[Target]
# export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
# cd /usr/lib/
# ln -s libts-1.0.so.0.0.0 libts-0.0.so.0
//Test qt application with touch
沒有留言:
張貼留言