There are two ways to load a QTE touch screen:
(1) loading the QTE touch screen;
Pay attention to the following three items:
When compiling QTE, in its custom configuration file (located in qtdir/src/tools/qconfig-XXX.h, its XXX is the custom name, this feature word can be specified in-qconfig xxx When configure is used.) the content to be added:
# Define qt_qws_ipaq
# Define qt_qws_ipaq_raw
Remove the automatic mouse recognition function: # define qt_no_qws_mouse_auto
Remove unnecessary mouse drives (this step is not required in practice, but it is helpful to reduce the QTE size ), the method is to set the configuration parameter to-no-mouse-PC-no-mouse-bus-no-mouse-yopy-no-mouse-vr41xx in configure.
Compile the application based on the compiled QTE LibraryProgram;
Connect the touch screen driver to the target machine. In qte3.0, if two ipaq-related macros are defined, the device file/dev/h3600_tsraw is opened by default. If you only define qt_qws_ipaq, open the device file/dev/h3600_ts.
On the target machine, set the environment variable qws_mouse_proto = linuxtp:/dev/h3600_tsraw.
(2) Use tslib;
Compile tslib1.3:
Perform the following operations:
#./Autogen. Sh # generate the configure file
Cc = $ arm_tool_path/ARM-Linux-gcc
Cxx = $ arm_tool_path/ARM-Linux-G ++
./Configure -- Host = arm-Linux -- target = arm-Linux -- disable-inputapi -- prefix = $ PWD/build
Make
Make install
Copy the entire directory of build to the target machine, and then make the following settings on the target machine, modify the/etc/profile file, and add the following environment variable settings
Export v_root =/XXX/build # path of the build on the target machine
Export tslib_tseventtype = h3600 # Set the type to h3600, which is mainly defined for the device struct in tslib. This definition must be consistent with that in the touch screen driver.
Export tslib_consoledevice = none # Set the console device to none. Otherwise, the default value is/dev/tty. In tslib1.3 source code, if it is not none, it will open $ (tslib_consoledevice) 1, the default is/dev/tty1, and then read the available settings of the console. This avoids the error of "open consoledevice: no such file or directory kdsetmode: Bad file descriptor ".
Export tslib_fbdevice =/dev/fb0 # specify the Frame Buffer Device
Export tslib_tsdevice =/dev/touchscreen/0raw # specify the node file of the touch screen device
Export tslib_calibfile = $ v_root/etc/pointercal # specify the storage location of the touch screen calibration file pintercal
Export tslib_conffile = $ v_root/etc/ts. conf # specify the location of the tslib configuration file
Export tslib_plugindir = $ v_root/share/TS/plugins # specifies the path of the touch screen plug-in.
Compile tslib1.4 (tslib07072006)
Perform the following operations:
Echo "ac_cv_func_malloc_0_nonnull = yes"> tslib/arm-linux.autogen # To prevent undefined reference to 'rpl _ malloc 'errors
Config_site = arm-linux.autogen. /configure cc = arm-Linux-GCC cxx = arm-Linux-G ++ -- Host = arm-s3c2410-linux-gnu -- target = arm-s3c2410-linux-gnu -- disable-input -- disable-arctic2 -- disable-mk712 -- disable-collie -- disable -corgi -- disable-ucb1x00 -- disable-linear-h2200 -- With-GNU-LD -- prefix = $ PWD/build
Make
Make install
Copy the entire directory of build to the target machine, and then make the following settings on the target machine, modify the/etc/profile file, and add the following environment variable settings. Different from tslib1.3, tlib1.4 loads the corresponding device struct definition through the module_raw h3600 statement in the configuration file ts. conf. Tslib_tseventtype macro has been abolished.
Export v_root =/XXX/build
Export tslib_tsdevice =/dev/touchscreen/0raw
Export tslib_calibfile =/etc/pointercal
Export tslib_conffile = $ v_root/etc/ts. conf
Export tslib_plugindir = $ v_root/lib/TS
Export tslib_consoledevice = none
Export tslib_fbdevice =/dev/fb0
One noteworthy problem is that tslib1.4 uses while (P = fgets (BUF, buff_size, f) in the ts_config function ))! = NULL) to load the statements in ts. conf, and Buf only has 512 bytes. Therefore, delete the definition statements that are not used in ts. conf to prevent segment errors.
Compile QTE Based on the tslib library.