Recently, a touch function has been added to the company's products. Because the circuit has been finalized and only the USB interface has been introduced, we can only use the touch screen of the USB interface on the market and have contacted a number of touch screen agents, there are problems during migration.
The platform for the company's products is PXA270 + linux2.6.27 + QT, and tslib is used for touch screen calibration.
After the touch screens of several manufacturers are connected to the panel, the system can almost detect the device. After CAT/dev/input/event2 or CAT/dev/hiddev0, click the touch screen, all terminals have garbled data output, which means that the touch screen driver is correct, but when tslib is used, the system always prompts selected device is not a touchscreen. After the QT program is run, the program cannot detect touch screen input.
It took me a long time to solve this problem and tried a variety of methods. I started to suspect that the tslib version is not working, so I downloaded several versions of tslib compilation from the Internet, download, execute, but none of them work. Then I want to skip tslib. Instead, I use the TP calibration program that comes with QT, So I re-compile QT and add the option QT-mouse-linuxt during compilation, remove QT-mouse-tslib. After compilation, enter the board and calibrate it. Tears ran away.
When the building is about to jump, the savior came. A vendor sends a driver to open one. It needs to change the tslib source code, and suddenly realizes that happiness is a tear. The original USB touch screen driver and tslib interface are inconsistent. You need to modify the tslib source code so that tslib can read the driver data.
Re-compile tslib, download it to the board, and execute ts_caculate. The touch screen Calibration interface for a long time has finally appeared. After the calibration, the QT program can detect the touch screen input.
Looking back at the whole process, I think that I have not fully understood tslib. As a result, operations are always performed in the early stage, and configuration takes a lot of time, if I have a deep understanding of tslib, know how it reads data, and how to transmit data to QT, I don't think so many detours will be taken.