Realization of touch screen under domestic embedded operating system

The domestic Godson 1A handheld computer and ReWorks embedded operating system provide a unified interface for upper-layer applications by transplanting the touch middleware tslib, and realize the calibration and testing of the touch screen.

1. Overview

Loongson series processors are general-purpose CPUs independently developed by China. Loongson 1 series processors are aimed at embedded applications such as industrial control and consumer electronics (mobile phones / MP4 / handheld computers, etc.). Loongson 1A chip integrates 32-bit processor core, 2D GPU, VGA and LCD display interface, and Southbridge chipset functions to meet ultra-low-cost cloud terminals, industrial control / data collection, network equipment, consumer electronics Demand in other fields.

ReWorks embedded operating system is an embedded real-time operating system developed by a China Electronics Technology Group based on the technical achievements of the "Ninth Five-Year Plan" and "Tenth Five-Year Plan". It has all source codes and is suitable for a variety of target hardware environments (x86, mips). .

In embedded, especially handheld electronic devices, touch screens have gradually replaced physical keyboards as mainstream input devices for embedded computer systems due to their friendly human-computer interaction, convenient and flexible operation, fast input speed, and small space occupation.

At present, the debugging method of touch screen under general operating systems such as Windows or Linux is mature, but there is no research on the debugging method of touch screen under the domestic embedded operating system ReWorks. This article introduces the handheld computer based on the domestic Godson 1A processor as a hardware platform. Calibration and testing of the touch screen under the domestic embedded operating system ReWorks.

2. Calibration principle of touch screen

In practical applications, the touch screen is usually used as an input device used in conjunction with the LCD screen, and it is necessary to map the coordinates sampled by the touch screen with the display coordinates of the LCD screen, that is, the so-called touch screen calibration. The purpose is to calculate the calibration coefficients by reading in the coordinate values ​​of several points, save the calculated coefficients, and then touch the touch screen coordinates every time you click the touch screen, and then pass the calibration coefficients to get the coincidence on the LCD screen. coordinate.

In this article, the handheld computer uses a four-wire resistive touch screen, the touch screen controller uses ADS7843E, and the touch screen calibration library tslib uses five-point calibration. The touch screen control principle is shown in Figure 2.

Figure 2 Schematic diagram of touch screen control

3. Implementation of calibration and test touch screen under ReWorks

tslib is a touch screen support library that provides a unified interface for different touch screens and also provides functions such as filtering, debounce, and calibration. tslib obtains the original device coordinate data from the touch screen driver, through a series of denoising, debounce, coordinate transformation and other operations to remove noise and convert the original device coordinates to the corresponding screen coordinates. This article transplants tslib to the domestic ReWorks operating system + Loongson 1A processor (mips) platform, and realizes the calibration and testing functions of the touch screen under ReWorks. The hierarchical structure of tslib under ReWorks system is shown in Figure 3.

Figure 3 Hierarchical structure of tslib under ReWorks system

Led Underground Lamp is a new buried decorative light with ultra-bright LED.

As the light source and LED constant current drive as the driving mode. 

Widely used in squares, outdoor parks, leisure places and other outdoor lighting, as well as park greening, lawn, square, courtyard, flower beds, pedestrian street decoration, waterfall, fountain underwater and other places night lighting, add luster to life.

Advantages of LED Underground Light with small volume, low power consumption, long service life, strong and durable, convenient installation, chic and elegant modeling, anti-leakage, waterproof.


1. Long life of Led Light Source, one-time construction, several years of use.


2. Low power consumption, no need to pay high electricity fees for lighting and beautification.


3, waterproof, dustproof, pressure and corrosion resistance


LED Underground Light

LED Underground Light,Led Underground Lamp,Outdoor Lights,Recessed Deck Light

Jilin Province Wanhe light Co.,Ltd , https://www.wanhelight.com