USB touch screen driver Transplantation

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.