Software Programming Guide - v2.0
Software Programming Guide - v2.0
1. Introduction
2.2 Interface
RS232 Interface
EETI’s superior design combines accuracy, sensitivity and speed to reach the
outstanding touch performance and ease of use. The drivers emulate the mouse input
and right button function, and support a variety of operation systems, including DOS,
Windows series: 98 / ME / NT4 / 2000 / XP / VISTA / 7, Windows CE.net, Mac, and
Linux kernel 2.4.x / 2.6.x with XFree86 or xorg system.
However, some special designs, our honor customers have to develop their own
programs communicating with the touch panel controller firmware directly. In chapter
1 of this application note, firstly the needed protocols are described. Then, the special
notices of programming RS232 is expressed. At the end, the sample code of parsing
the protocols and the two points calibration conversion formulas are listed.
2.1 Protocol:
All eGalaxTouch controllers including RS232 interface use the protocols. And, the
protocols can be classified into 2 groups: Diagnostics Packet and Report Packet.
These packets are issued from the host for querying some device information.
The controller firmware will report the corresponding data to the host. The packet
format is as follows:
The maximum packet size is 16 bytes. The first byte is Start of Packet as 0X0A.
The second byte is the length of Response. The third byte is the issued command
and the last part (length is defined in second byte) is the response from controller
firmware.
eGalaxTouch USB HID compliant controllers support Microsoft HID touch digitizer.
By default, eGalaxTouch HID compliant controller reports with HID format for
coordination data according to the HID report descriptor it reported to Host
system. In addition, eGalaxTouch serial RS232 controllers support emulation
modes. Serial controller’s report format depends on the format of command sets
it receives from Host. By default, it reports with non-emulated packet format as
below. To make sure the controllers to report with the below format, the host
driver should issue any one of diagnostics packet data to controller. For
example, host driver may send a “Check Active”( 0x0A, 1, ‘A’ ) packet data to
controller to make it report with below report format.
Byte0: It is the header of the point packet. It contains below point information
Z: pressure bit. eGalaxTouch SAW technology controller may report with
pressure information.
Z = 0: means no pressure information
Z = 1: means Byte5 is pressure information.
M: Player ID. eGalaxTouch multi-player controller report player ID
information
M = 0: means no player ID information
M = 1: means Byte5 is player ID
while( TRUE )
{
if( WAIT_OBJECT_0 == ::WaitForSingleObject( pPort->m_hStopEvent, 0 ) )
{
return 100;
}
1. LL and UR are the calibration points of touch panel, the points are setup at
LL = ( 1/8 screen X, 1/8 screen Y ) = ( 256 , 256 ) ADC ;
UR = ( 7/8 screen X, 7/8 screen Y ) = ( 1791 , 1791 ) ADC
2. When we do the calibration, press on these two points, then we get the row data
LL‘ and UR’:
LL’ = ( LLX, LLY ) ; UR’ = ( URX, URY )
3. After the calibration, when you touch the panel and get another row data X and Y.
The new position after calibration are X’ and Y’, and the conversion formulas are
as follows:
X – LLX
X’ = * 1536 + 256
URX – LLX
Y – LLY
Y’ = * 1536 + 256
URY – LLY
= 1, touch down