Touchkit Devices in Windows Device Manager

eGalaxTouch Devices in Windows® Device Manager

After driver installation completed, all of eGalaxTouch touchscreen controller devices will be list in the “Mice and other pointing devices” folder in Windows® Device Manager. Click on the specified eGalaxTouch touchscreen controller device and select the properties on the pop up context menu, the device property pages will show as below

In addition to some system provided property pages for mice function setting, there are some other property pages in this property sheet for eGalaxTouch touchscreen controller specific configuration setting. If user got the driver files( .inf, .sys ) from Microsoft® via Internet, user can do configuration and calibration for the devices with this property pages. If user got the complete software driver installation package to install the software, eGalaxTouch also provides another software utilities for advanced setting for some advanced application.

See Also

eGalaxTouch Configuration Utility

xTouchmon Utility, Monitor rotation, Display Resolution

Setting Property Page, Beep, Mouse Emulation Mode

Tools Property Page, Calibration, Linearization, Drawing Test

Display Property Page, Multiple Monitor, Split Display

Edge Compensation Property Page, Edge Compensation Parameters

Hardware Property Page, Hardware Information

About Property Page


Touchkit Software Installation Guide for Windows 2000/XP

eGalaxTouch Software Installation Guide for Windows® 2000 / Windows® XP / Windows Vista® / Windows® 7 / Windows® 8 / Windows® 8.1 / Windows® 10 operating system

eGalaxTouch driver software installation package was created with Installshield® tool. The installation package contains files as below

Double click at the setup.exe file to start software driver installation. Then, the setup program will guide user to complete software installation.

Press Next button to continue installation, then, a new dialog popped up as below,

This dialog shows to ask user if the PS2 filter driver for touch screen to be installed. User can check this check for PS2 filter driver installation. The standard PS2 mice can still work well after this filter driver installed because eGalaxTouch PS2 filter driver can work with both standard PS2 mice and PS2 touchscreen. But, this filter driver may does not work with other devices with the PS2 mouse port. After check or uncheck this check box, press Next button to continue installation. Then, it shows new dialog as below,

This dialog shows to ask user if the RS-232 driver for touch screen to be installed. User can check this check for RS-232 driver installation. After check or uncheck this check box, press Next button to continue installation. Then, it shows new dialog as below,

Also, eGalaxTouch software provides user with a fast 4 points calibration. If the system needs 4 points calibration to make sure the touch accuracy every system reboot, user can check this check box. The 4 points calibration window will be popped up for calibration whenever system boot up if this check box was checked during driver software installation.

Press Next button to continue installation. The setup program prompts a message box to hint

user to make sure that the eGalaxTouch USB controller devices were well connected with system USB ports to guarantee the USB eGalaxTouch device drivers updated after driver installation. Then, just press OK to continue,

eGalaxTouch driver package supports multiple monitor operation. If your application is for multiple monitors system, please check the check box to support multiple monitors. So that, the a multiple monitor setting property page will be shown in eGalaxTouch utility.

Then, press Next to continue.

A pop up window for user to choose the target path the files will be copied to. Then, Press Next to continue,

A dialog popped up for user to assign the target program folder. Press Next

If install RS-232 driver check box was checked, the setup program will scan system COM ports.

The setup program will scan system COM ports to detect if any eGalaxTouch serial device was connected. If yes, it also pops up a message box for user to make sure if setup program install driver for this new found device.

Just Press Yes or No to confirm driver installation for this new found device.

Finally, if PS2 filter driver was installed during this software installation, a reboot dialog is popped up for system reboot request to complete driver installation.

After driver installation, a shortcut will be generated and shown on the desktop. And, a new file group generated for eGalaxTouch as below,


General Property Page

The general property page in eGalaxTouch utility shows all of eGalaxTouch touchscreen controllers installed as below, including RS232, USB and PS2 interfaces.

User can select the controller list in the window to do configuration for it. When user use a mouse or other input device to select the controller device in the controller list window, The controller name will be shown in the title bar of the main window( the property sheet ). Also, all of the other property pages will be updated for this selected controller. In some application, user may in place edit and change the controller name for easy identification.

In addition, there are 3 function push buttons in this property page.

1. Add

The function button is used for serial RS232 controllers only. Press this button to search the eGalaxTouch serial controllers connected with the system COM ports. Whenever it finds a new eGalaxTouch serial controller, a new serial controller icon object will be shown in the controller list window automatically.

USB eGalaxTouch device supports plug and play, the icon object for USB controller will be shown in the controller list window automatically when the USB controller is connected with the system USB port. And, the icon object for the USB controller will disappear automatically as soon as the device was removed from the system USB port.

eGalaxTouch PS2 driver support PS2 mice and eGalaxTouch touchscreen controller. It can works with both PS2 mice and eGalaxTouch touchscreen PS2 controller. After the eGalaxTouch PS2 driver was installed, this utility assumes the PS2 touchscreen controller exists and is always shown in the controller list window.

2. Remove

This function button is used for serial RS232 controllers only. This button will be greyed and disabled automatically when the selected controller in the controller list window is not RS232 type. Press to remove and uninstall the selected serial RS232 controller from the system. Then, this serial RS232 icon object in controller list window disappears automatically.

USB eGalaxTouch device supports plug and play, the icon object for USB controller will be shown in the controller list window automatically when the USB controller is connected with the system USB port. And, the icon object for the USB controller will disappear automatically as soon as the device was removed from the system USB port.

eGalaxTouch utility does not allow user to remove/uninstall the PS2 device driver dynamically. To uninstall the eGalaxTouch PS2 driver, user needs to go to Windows® Device Manager to do un-installation. In addition, after PS2 un-installation, it needs to system reboot to complete un-installation.

3. Monitor Mapping

eGalaxTouch driver utility supports multiple monitor and display system. This function will help user to does monitor mapping. a new window will be popped-up on a monitor as below. Please touch the touchscreen panel to do mapping. In addition , please do calibration after finish monitor mapping.

See Also

4 points, linearization/25 points calibration, draw testing

Beep, Mouse emulation, Double click, Auto right click

Multiple monitor and split display configuration


Tool Property Page

Calibration, draw test tools and the linearity curve of the touchscreen were list in this property page shown as below for user to do touchscreen calibration and touch position test.

User can do calibration or draw test by pressing the function push buttons.

1. Linearization Curve

Linearization curve of the touchscreen is list in this page for reference and trouble shooting purpose.

2. 4 points calibration

It needs calibration before the touchscreen can work accurately. Whenever the user feel the accuracy lost, user can do calibration again to get a more accuracy touch function.

Pressing this button, a new window will be popped-up at the location when the touchscreen was mapped to area for this touch system to guide the user do 4 points calibration.

User should follows the guide to touch and hold the blinking symbol in the calibration window until it shows “OK” to make sure that the utility can gather enough data for computation.

3. Clear and Calibration

Press this button to erase the 25 points calibration/linearization parameters and force user to do 4 points calibration again. After 25 points calibration data was clear, the 4 points calibration data will be invalid. It needs to do 4 points calibration.

4. Linearization

Linearization ( 25 or 9 points calibration ) function is used to compensate the touchscreen linearity. After linearization completed, the linearity of the touchscreen will be shown in the Linearity curve window.

Pressing this button, a new window will be popped-up at the location when the touchscreen was mapped to area for this touch system to guide the user do 25 points calibration. User should follows the guide to touch and hold the blinking symbol in the calibration window until it shows “OK” to make sure that the utility can gather enough data for computation.

5. Draw Test

This function is used for accuracy and performance check. Press this button and a new pop up window will be popped up in the location where the touchscreen was mapped to the touch system as below,

User can press the Clear button to clear the window. Press Quit button to terminate this draw test.

See Also

Multiple monitor

Beep, Mouse Emulation Mode


Touchkit Setting Property Page

eGalaxTouch Setting Property Page

The Setting property page can be shown in eGalaxTouch Utility as below,

There are function buttons and check boxes described as below

1. Beep

1-1 ) Beep On Touch

Check this check box to enable driver to generate a beep sound when touch touchscreen state is switched from untouched to touched state.

1-2 ) Beep On Release

Check this check box to enable driver to generate a beep sound when touchecreen state is switched from touched state to untouch state.

1-3) Beep From System Beep

Check this check box to make the beep from system speaker.

1-4) Beep From Sound Card

Check this check box to make the beep from sound card.

1-5) Frequency

Adjust this frequency to control the beep sound frequency generated by the driver.

1-6) Duration

Adjust this duration to control the beep sound duration.

2 Linearization Style

eGalaxTouch utility provides user with both 9 points and 25 points calibration for linearization. User can select the suitable kind of linearization type.

3 Double Click Time

The double Click Time group is used to set system double click time. Change this value will affects the double click behavior for all of the mice devices in the system. Two continuous clicks at the same area within this specified time period will be recognized as a double click event.

4 Double Click Area

The double click area group is used to set the system double click area. Change this value will affects the double click behavior for all of the mice devices in the system. Two continuous click with this specified area in the specified double click time will be recognized as a double click event.

5 Mouse Emulation mode

There are 5 mouse emulation modes for eGalaxTouch touchscreen controllers. Press on the button to change the emulation mode,

4-1) Normal Mode

Normal mode behaves mouse button down and mouse move. User can select this mode to select object, and dragging the object.

4-2) Click On Touch

With this Click On Touch mode, the driver emulates a mouse click event when the touchscreen state was switched from un-touched state to touched state. Then, the driver always generate mouse move event and is tracking the touch position until the touchscreen state switched to un-touch state.

4-3) Click On Release

With this Click On Release mode, the driver emulates a mouse click event when the touchscreen state was switched from touched state to un-touched state.

4-4) Click On Touch without moving cursor

With this mode, the driver behaves similar as Click On Touch mode. The cursor does not move to the touch position except the first touch point.

4-4) Click On Release without moving cursor

With this mode, the driver behaves similar as Click On Release mode. The cursor does not move to the touch position except the lift-off point.

4-5) Desktop Mode

With this mode, the driver behaves similar as Normal Mode. But the driver will not report mouse button down immediately after user touches down.

User needs to touch and stay at one point for a few milli-second, then the driver will report mouse touch down.

6 Option

User can set configuration for some advanced functions with this option button. Press this button, a pop up property sheet window will be popped up and shown as below.

The advanced functions are

5-1) Enable Constant Touch( Hold )

Constant Touch is the function to check if the most recent touched position is same

as the previous touched point. If the points difference is smaller than the defined area, the driver does not generate any mouse event to reduce system loading.

Check this check box to enable this function ( Hold ) and un-check it to disable this

function.

5-2) Enable Auto Right Click

If the touchscreen was kept touched for a specified time, the driver will generate a

mouse right button click event if this function was enabled.

Check the check box to enable this function and uncheck it to disable this function.

5-3) Enable Touch

The driver read the data input from controller to generate mouse event. However, it can be enabled or disabled to generate the mouse event.

Check this check box to make driver to generate the mouse event when it receives the touch point input from eGalaxTouch touchscreen control and un-check it to stop driver generating the mouse event.

5-4) Enable cursor stabilization

A software filter was implemented inside the driver to filter some noise to stabilize and smooth the touch points. Then, the user can see a more stable cursor.

Check this check box to enable this software filter and un-check it to disable this function.

5-5) Constant Touch Area ( Hold area )

Adjust the parameter for Constant Touch( Hold ) function. This is a criterion to judge if the most recent touched point is same as the previous touched point. If the points difference is within this area, it will be recognized as the same touch point and the driver does not generate new mouse event for this new touch point.

5-6) Auto Right Click Time

Adjust the Right click time for auto right click function. If the touchscreen was touched and hold for this period of time, the driver generates a mouse right click event.

See Also

4 points, linearization/25 points calibration, draw testing

Multiple monitor and split display configuration


Monitor Property Page

eGalaxTouch driver utility supports multiple monitor and display system. To work with multiple monitor system, user needs to do configuration and map the touchscreen working area to the system display area correctly. User can do such configuration with the property page shown as below,

Display

The system monitor display geometry is shown in the Monitors window in this page to show the locations of all of the monitors of the system.

Note: xtouchmon.exe is another utility for eGalaxTouch touchscreen system. This tray icon utility can monitor the system monitor display configuration change and correct the touchscreen monitor mapping relationship automatically as soon as the system monitor display configuration changed. We strongly suggest the user to make sure xtouchmon.exe is launched for multiple monitor system.

Users can follow below instructions to do the configuration

1. Enable multiple monitor

Check this check box to enable multiple monitor support and uncheck it to disable multiple monitor support. When this function is disabled, the touchscreen will be mapped to the primary monitor automatically.

When this function is enabled, user can double click on the monitor area in the monitor geometry window to assign the monitor area where the touchscreen will be mapped. In other words, the touchscreen will work with the selected monitor. Then, the selected monitor area rectangle line will be changed to white and the other monitor rectangles line will be grey.

2. Map to main monitor when the system has only one monitor

When the multiple monitor function was enabled, and the system has only one monitor,

Driver allows user to generate the mouse event for the primary monitor or not when the touchscreen is not mapped to the primary monitor. Check the check box to enable this function, then, the driver will generate the mouse event for the primary monitor even though the touchscreen is configured as other monitor mapping and multiple monitor function is enabled.

3. Operation Mode

eGalaxTouch driver supports split display mode for those applications which do not map the touchscreen to the full screen of the monitor.

3-1) Full screen

The touchscreen will be mapped to the full screen of the specified monitor.

3-2) Right screen

The touchscreen will be mapped to the half right screen of the specified monitor.

3-3) Left screen

The touchscreen will be mapped to the half left screen of the specified monitor.

3-4) Upper screen

The touchscreen will be mapped to the upper half screen of the specified monitor.

3-5) Lower screen

The touchscreen will be mapped to the lower half screen of the specified monitor.

3-6) Other operation mode

3-6-1) Quarter 1

The touchscreen will be mapped to the first quarter area of the specified monitor display.

3-6-2) Quarter 2

The touchscreen will be mapped to the 2nd quarter area of the specified monitor display.

3-6-3) Quarter 3

The touchscreen will be mapped to the 3rd quarter area of the specified monitor display.

3-6-4) Quarter 4

The touchscreen will be mapped to the 4th quarter area of the specified monitor display.

3-6-5) Customized

User can type in the range (Left, Right, Top, Bottom) to customize the working area. With this mode, the driver does not correct the mapping area when the display resolution changed. It needs to do configuration setting again whenever the display resolution changed.

User can also customize the working area with “Drag Working Area” function.

Click the “Drag Working Area” button, the image will switch back to the desk top, then user can customize the working area by drawing and dragging the rectangle. Then click “confirm” to set the working area. Or “Quit” to cancel.

3-7) Active Area

If several areas but not the full screen are needed as working area, eGalaxTouch allows user to customize up to 6 active areas, only in which touches will be recognized.

Go to “Active Area” Tab first, user can type in the range of the preferred active areas or customize the active areas by using “Dray Active Area” function.

Check the box for “Enable The Active Area Function”

If user prefer to type in the range of the active area, please use the scroll bar to number and choose the active areas.

If user prefer to use “Drag Active Area” function, please click on the “Drag Active Area” button. The image will switch to desk top, and there are six box in different colors numbered from 1~6.

When a box is touched (or clicked), user can draw/drag a rectangle as the customized active area.

When another box is touched, user can draw/drag another rectangle as another active area.

User can use this function to customize six active areas, these areas can be overlapped.

If user wishes to cancel a particular active area, simply click on the box on the left hand side, and click “Clear”.

For example, Area 1 is now cleared.

Once everything is done, click “Confirm”.

User can “Quit” anytime during customizing the active areas.

See Also

4 points, linearization/25 points calibration and drawing test

Beep, Mouse emulation, Double click, Auto right click


Touchkit Edge Compensation Property Page

eGalaxTouch Edge Compensation Property Page

For some special touchscreen which can not reach to the edge area of the full screen, eGalaxTouch utility provides user with edge compensation tool to solve such problem and make it easy to touch the edge area without accuracy lost. Stretch a little bit near the edge area.

User can set the stretch percentage for the 4 edges. In addition, it allows user to set an offset for the touch point for special application.


Hardware Property Page

This hardware property page shows the model and firmware version of the eGalaxTouch touchscreen controller. The software will query the hardware information from controller and show the information as below.


About Property Page

“About” shows some information for eGalaxTouch driver information. User can click Download to download the latest driver from web site.


xTouchmon utility

eGalaxTouch software package contains an utility to monitor some events related to touchscreen application. After eGalaxTouch software package installed, a tray icon utility was shown in the system task bar as below. Whenever the mouse cursor moves on the tray icon, a tool tip shows as

This is a fast tool for user to change some driver setting without launching the eGalaxTouch configuration utility. When user right click on this tray icon, a pop up context menu shows as below,

This pop up menu shows the all of the functions this utility supports.

1. Apply To Touchscreen

When user selects this function, the sub-menu shows all of the eGalaxTouch devices installed in the system. User can choose the next function configuration settings will be applied to which devices. xTouchmon allows the configuration settings applied to all of the eGalaxTouch devices or some specified devices.

2. Mouse Mode

This Mouse mode has sub-menu as below to show all of the mouse emulation modes the driver supports.

This mouse emulation mode changed will be applied to the specified devices.

3. Beep

User can change the Beep Mode with this function menu. And, the change will be applied to the specified devices immediately.

4. Auto Right Click

User can enable/disable auto right click function with this function menu. The change will be applied immediately to those specified devices.

5. Display Button

This button is designed to show/hide the below right click button window. User can click on this right button before generating a right click event.

6. 4 Points calibration

Select this function to pop up the 4 points calibration window for user to do calibration for those specified devices.

7. eGalaxTouch Utility

eGalaxTouch configuration utility will be launched if user selects this function.

8. Support Rotation

Monitor display rotation support. Enable it, this utility will correct the touchscreen orientation to match with monitor display orientation whenever it detects monitor rotation. This correction will be done automatically if the system video adapter driver supports Microsoft Win32® APIs for monitor rotation. If the video adapter driver does not support Microsoft Win32® API for monitor rotation, the utility will pop up a one point calibration window to correct the orientation mapping.

9. Exit

Exit function to terminate the xTouchmon daemon process. After this daemon process terminated, all of functions the utility supports will be disabled.

In addition to above functions, xTouchmon also monitors monitor display setting change. It will correct the coordination mapping automatically except the touchscreen work with customized area mode whenever it detect monitor resolution change, numbers of system monitors change.


Packet Format for Touchkit Touchscreen controller

Packet Format for eGalaxTouch Touchscreen controller

eGalaxTouch Touchscreen system defines two kinds of packet format for communication between Host and controller device. Both of these two kinds of packet format are valid for all of series of eGalaxTouch touchscreen controllers with RS232, USB, PS2, and I2C interfaces.

Diagnostics 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:

0x0A

LengthInByte + 1

Command

Response

1 Byte 1 Byte 1 Byte LengthInByte

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.

1. Check active : this packet is to check if the device is working properly.

Host issues

0x0A

1

‘A’

Device responds when active

0x0A

1

‘A’

2. Get firmware version

Host issues

0x0A

1

‘D’

Controller firmware responds

0x0A

Length

‘D’

Response

The response is an ASCII string, such as ‘0.99’

3. Get type

This packet is to request the controller type.

Host issues

0x0A

1

‘E’

Controller firmware responds

0x0A

Length

‘E’

Response

Report Packet

eGalaxTouch USB HID Touchscreen controllers support Microsoft HID touch digitizer. By default, eGalaxTouch HID compatible controller report 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.

Each report packet may contain 5 or 6 bytes as below:

Byte0

Byte1

Byte2

Byte3

Byte4

Byte5
MSB LSB

1 | Z | M | 0 | 0 | AD1 | AD0 | Status
0 | A13 | A12 | A11 | A10 | A9 | A8 | A7
0 | A6 | A5 | A4 | A3 | A2 | A1 | A0
0 | B13 | B12 | B11 | B10 | B9 | B8 | B7
0 | B6 | B5 | B4 | B3 | B2 | B1 | B0
0 | P6 | P5 | P4 | P3 | P2 | P1 | P0

Byte0: Byte0 is the header of the point packet. It contains below point

Information

Z : pressure bit. eGalaxTouch controller SAW technology may report with

pressure information.

Z=0 means no pressure information

Z=1 means Byte5 is pressure information.

M: Player ID. eGalaxTouch multipler controller report player ID information

M=0 means no player ID information

M=1 means Byte5 is player ID

Status: touch down status.

Status = 1 means touch down

Status = 0 means lift off point

Byte1~Byte4:

AD1,AD0: resolution information of the current point coordination.

AD1:AD0 = 0:0 means the coordination resolution is 11 bits

AD1:AD0 = 0:1 means the coordination resolution is 12 bits

AD1:AD0 = 1:0 means the coordination resolution is 13 bits

AD1:AD0 = 1:1 means the coordination resolution is 14 bits

indicates the touch status: 1 for touch down and 0 for touch up.

A10/A11/A12/A13 – A0: 11/12/13/14 bits of 1st direction raw data

B10/B11/B12/B13 – B0: 11/12/13/14 bits of 2nd direction raw data

Please be aware that A and B just represent 2 resolution directions of the touch panel.

Byte5: Pressure or player ID

The point packet has 6th byte only when Z=1 or M=1. Otherwise, the

point packet has 5 bytes only. If Z=1, this byte is pressure value. If

M=1, this byte is player ID.

See Also

Communication interface


Communication Interface

eGalaxTouch provides controllers to communicate with Host devices with RS232, USB, PS2, and I2C interfaces.

RS232 Interface

The RS232 interface controllers communicate with Host device with RS232 protocol definition as below

Baud rate: 9600 bps

Data bits: 8 bit

Stop bit: 1 bit

Parity check: NONE

PS/2 Mouse Interface

eGalaxTouch PS2 controller follows the IBM PS2 mouse specification to communicate with Host device.

USB Interface

eGalaxTouch USB controllers communicate with Host with USB Low speed or Full Speed and ��Vendor Specific Class��.

The VID( Vendor ID ) and PID( Product ID ) may be one of

u 1.) VID = 0123, PID=0001

u 2.) VID = 0EEF, PID=0001

u 3.) VID = 0EEF, PID=0002

l Two end points are used:

u Control pipe:

for standard USB PnP and writing packets to controller device controller.

u Interrupt or Bulk IN pipe:

for reading packet from controller device.

l It needs to wait for 3ms at least to issue another write command after one write command is issued

l The polling interval of reading with interrupt pipe is 5 ms

l Control Write Urb format is as follows

/*==================================================================*

/* Vendor specific request Urb format for Touch Panel controller kit */

/* with Win2000 DDK */

/*=====================================================================*/

UsbBuildVendorRequest( pWriteUrb, //IN PURB Urb,

URB_FUNCTION_VENDOR_DEVICE , //IN USHORT Function,

sizeof( struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST ), //IN USHORT Length,

0, //IN ULONG TransferFlags,

0, //IN UCHAR ReservedBits,

0, //IN UCHAR Request,

0, //IN USHORT Value,

0, //IN USHORT Index,

pTxBuffer, //IN PVOID TransferBuffer OPTIONAL,

NULL, //IN PMDL TransferBufferMDL OPTIONAL,

ulBytesToSend, //IN ULONG TransferBufferLength,

NULL //IN PURB Link OPTIONAL,

);

I2C Interface

l Baud rate: less than 12.5 kbps

l I2C transaction package: ( Packet ) = Bytes of transfer + Payload

Where the payload is packet for touch screen feature.

l Default address: 04

l Software needs to reassemble the payload as the eGalaxTouch packet.

Example: Bytes of transaction = N

N payload bytes

1 byte

Tx

ACK

Address 0

STOP

START

NAK

DATAN

DATA1

ACK

ACK

N
�K..

1 byte

Rx

ACK

1 bit

1 byte

N payload bytes

STOP

NAK

DATAN

ACK

DATA1

ACK

N

Address 1

START
�K.

l I2C Timming:

Packet Parser Sample Code

#define MAX_BUFFER 1024

#define MOUSE_PACKET_LEN 5

#define MAX_CMD_LEN 16

#define POLLING_BUFFER_SIZE 3

unsigned __stdcall PortThreadRoutine( LPVOID pContext )

{

CPort *pPort = ( CPort *) pContext;

CHAR pBuffer[ MAX_BUFFER ];

CHAR pMsgBuffer[ MAX_BUFFER ];

DWORD dwRead = 0;

DWORD dwCnts = 0;

BOOL bPointPacket = FALSE ;

BOOL bCmdPacket = FALSE;

DWORD dwCmdPacketLen;

UCHAR ucChar;

INT i;

while( TRUE )

{

if( WAIT_OBJECT_0 == ::WaitForSingleObject( pPort->m_hStopEvent, 0 ) )

{

return 100;

}

// read packet from COM port or USB port

if ( pPort->Read( pBuffer, POLLING_BUFFER_SIZE, &dwRead, pPort->m_hReadEvent ) )

{ // parse the packet

for( i = 0; i< (INT)dwRead; i++ )

{

ucChar = pBuffer[ i ] ;

if( ( pBuffer[ i ] & 0xF0 ) == _SYNCBIT ) && !bCmdPacket )

{

dwCnts = 0;

pMsgBuffer[ dwCnts ] = pBuffer[ i ];

bPointPacket = TRUE;

dwCnts++;

continue;

}

else if( _SOP == ucChar && !bPointPacket && !bCmdPacket )

{

bCmdPacket = TRUE;

dwCmdPacketLen = ( DWORD )-1;

bPointPacket = FALSE;

continue;

}

else if( bCmdPacket )

{

if( ( DWORD )-1 == dwCmdPacketLen )

{

dwCmdPacketLen = ( DWORD )pBuffer[ i ];

dwCnts = 0;

if( dwCmdPacketLen > MAX_CMD_LEN )

dwCmdPacketLen = MAX_CMD_LEN;

continue;

}

pMsgBuffer[ dwCnts ] = pBuffer[ i ];

dwCnts++;

if( dwCmdPacketLen == dwCnts )

{

dwCmdPacketLen = 0;

pMsgBuffer[ dwCnts ] = 0;

dwCnts++;

// Here, a completely Cmd packet received !!!

// Do what you want to do!

// For instance,

// pPort->DisPatchMessage( pMsgBuffer, dwCnts );

dwCnts = 0;

bCmdPacket = FALSE;

continue;

}

continue;

}

if( bPointPacket )

{

pMsgBuffer[ dwCnts ] = pBuffer[ i ];

dwCnts++;

if( MOUSE_PACKET_LEN == dwCnts )

{

// Here, a completely point packet received !!!

// Do what you want to do!

// For instance,

//pPort->DisPatchMessage( pMsgBuffer, dwCnts );

dwCnts = 0;

bPointPacket = FALSE;

}

continue;

}

}

}

}

}

See Also

Data Packet format


2 Points Calibration for Position Decoding

1. LL and UR are the calibration target 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. During calibration, press on these two target points, the raw data are obtained as

LL ‘and UR’:

LL’ = ( LLX, LLY ) ;

UR’ = ( URX, URY )

3. After the calibration, whenever the panel was touched, firmware report the raw data X and Y. Then, the calibrated position X’ and Y’ are calculated with the formulation as follows:

X – LLX

URX – LLX
X’ = X 1536 + 256

URY – LLY

Y – LLY
Y’ = X 1536 + 256


Interface to Touchkit Device Driver

Interface to eGalaxTouch Device Driver.

(This Document is for eGalaxTouch driver Version 4.0 or later for Microsoft® Windows® 2000/ Windows® XP / Windows Vista® / Windows® 7 / Windows® 8 / Windows® 8.1 / Windows® 10 operating system only.)

eGalaxTouch allows user to communicate with the device driver. User can either use eGalaxTouch API or Win32® APIs such as CreateFile, CloseHandle, ReadFile, WriteFile, DeviceIoControl to communicate with device driver.

1. Using eGalaxTouch API

eGalaxTouch API implements a set of functions with Win32® API for user to interact with eGalaxTouch device driver easily. The system must have MFC42.dll support to work with eGalaxTouch API.

Program designer call EnumerateTouchInstance to enumerate all of eGalaxTouch devices installed in the system. And then, open the device with CreateDevice to work with the device driver. StartDeviceThread to start reading data comes from device. Pls make sure that no other process or thread is reading data the device with ReadFile so that the API can read correct and complete data packet from driver. In addition, designer can call other API functions to configure driver behavior.

2. Win32® API

eGalaxTouch device driver export the device interface for its device objects. User can enumerate all of these devices with the GUID = { 0xf771fb3b, 0x7de, 0x4f40, { 0xbb, 0xdf, 0xf5, 0xda, 0x97, 0x71, 0x65, 0x5d } }.

In addition, the program designer can open the enumerated device with CreateFile. Then,

It can read data from device with ReadFile, write data to device with WriteFile, and configure device driver behavior with DeviceIoControl.

Example : enumerate all eGalaxTouch devices.

guidDeviceInterface = { 0xf771fb3b, 0x7de, 0x4f40, { 0xbb, 0xdf, 0xf5, 0xda, 0x97, 0x71, 0x65, 0x5d } };

SP_DEVICE_INTERFACE_DATA InterfaceData;

PSP_DEVICE_INTERFACE_DETAIL_DATA pIfDetailData;

DWORD dwIndex = 0;

HDEVINFO hDevInfo = SetupDiGetClassDevs(

&guidDeviceInterface,

NULL, hWnd, //IN HWND hwndParent, PTIONAL

( DIGCF_DEVICEINTERFACE | DIGCF_PRESENT ) );

if( INVALID_HANDLE_VALUE == hDevInfo )

{

return 0;

}

InterfaceData.cbSize = sizeof( SP_INTERFACE_DEVICE_DATA );

while( SetupDiEnumDeviceInterfaces( hDevInfo,

NULL,

&guidDeviceInterface,

dwIndex,

&InterfaceData ) )

{

SP_DEVINFO_DATA did;

DWORD needed;

dwIndex++;

SetupDiGetDeviceInterfaceDetail( hDevInfo,

&InterfaceData,

NULL,

0,

&needed,

NULL );

pIfDetailData = ( PSP_DEVICE_INTERFACE_DETAIL_DATA )malloc( needed );

if( NULL == pIfDetailData )

{

break;

}

pIfDetailData->cbSize = sizeof( SP_DEVICE_INTERFACE_DETAIL_DATA );

did.cbSize = sizeof( SP_DEVINFO_DATA );

SetupDiGetDeviceInterfaceDetail( hDevInfo,

&InterfaceData,

pIfDetailData,

needed,

NULL,

&did );

// Note

// pIfDetailData->DevicePath is the symbolic link name of the device object.

// Program designer has to save this symbolic name and append “#EDO” to it to

// open the device with Win32® API CreateFile.

//

// Do something here!

//

free( pIfDetailData );

}

SetupDiDestroyDeviceInfoList( hDevInfo );

return dwIndex;


Touchkit API for Windows 2000/XP

eGalaxTouch API for Windows® 2000 / Windows® XP / Windows Vista® / Windows® 7 / Windows® 8 / Windows® 8.1 / Windows® 10

eGalaxTouch driver package contains a dynamic Link Lib( xtkutility.dll ) which exports some APIs for special application. User can communicate with eGalaxTouch driver by way of this APIs. The exported APIs were list as below

CloseDevice

CreateDevice

DoCalibration

DoDrawTest

DoLinearization

EnableAutoRightButton

EnableConstTouch

EnableTouch

EnumerateTouchInstance

GetBranchInfo

GetCalInfo

GetConstTouchInfo

GetEdgeInfo

GetLinzInfo

GetMonitorInfo32

GetMouseMode

GetTouchBeepInfo

RegisterDeviceRemovalHook

RegisterTPNotifyMessage

RestartFirmware

SetBranchFormat

SetCalInfo

SetConstTouchInfo

SetEdgeInfo

SetConstTouchInfo

SetLinzInfo

SetMonitorInfo32

SetMouseMode

SetTouchBeepInfo

StartDeviceThread

StopDeviceThread

UpdateControllerCalInfo

UpdateControllerLinzInfo

VerifyEEPROM


typedef struct tagBeepInfo

BEEP_INFO

Beep information structure

Driver before 5.0.1.5130

typedef struct tagBeepInfo{

LONG lFrequency;

LONG lDuration;

ULONG ulMode;

}BEEP_INFO,*PBEEP_INFO;

Driver 5.0.1.3130 or later

typedef struct tagBeepInfo{

LONG lFrequency;

LONG lDuration;

ULONG ulMode;

ULONG ulSource

}BEEP_INFO,*PBEEP_INFO;

Members

lFrequency

Beep Frequency

lDuration

Beep duration

ulMode

Beep mode. This can be the combination of following flags

BEEP_ON_TOUCH

Beep when touched.

BEEP_ON_RELEASE

Beep when released.

ulSource

beep source. It can be system speaker or external speaker

BEEP_SYSTEM_BEEP

Beep via system speaker

BEEP_SOUND_CARD

Beep via external speaker

See Also

SetTouchBeepInfo

GetTouchBeepInfo


IOCTL_SET_BRACNHFORMAT

Control Code to set the data format report from driver. Caller can call Win32® API DeviceIoControl with this control code and BRANCH_INFO data to set the data format.

Example

DeviceIoControl( hFile,

IOCTL_SET_BRACNHFORMAT,

pInfo,

sizeof( BRANCH_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_BRACHFORMAT SetBranchFormat GetBranchFormat


BRANCH_INFO

typedef ULONG BRANCH_INFO;

Flags to control the data report format of driver. User program can set this variable to control the data report from driver. This variable value can be the combination of following flags.

Flags

BRANCH_ENABLED

Set this flag to enable the driver to report data comes from devices. The user program can receive data only when this flags was set.

BFORMAT_CAL

Set this flag so that the driver reports calibrated data with 4 points calibration. Then, the user program can receive the data which has been corrected with 4 points calibration.

BFORMAT_LINZ

Set this flag so that the driver reports the corrected data with 25 points linearization. Then, the user program can receive the data which has been corrected with 25 points linearization.

BFORMAT_EDGE

Set this flag so that the driver reports the corrected data with edge compensation. Then, the user program can read the corrected data with edge compensation from driver.

BFORMAT_CONST_TOUCH

Set this flag to that the driver report the data with constant touch function enabled. Then, the user program can read the data with constant touch function enabled.

BFORMAT_MONITOR

Set this flag so that the driver report the data corrected with monitor mapping. Then, the user program can read the data corrected with monitor mapping.

BFORMAT_SPLIT

Set this flag so that the driver reports the corrected data with split display function.

BFORMAT_ORIENT

Set this flag so that the driver reports the corrected data with orientation correction.

See Also

IOCTL_SET_BRACNHFORMAT

IOCTL_GET_BRANCHFORMAT

SetBranchFormat

GetBranchFormat


CAL_INFO

Calibration Information data structure

typedef struct tagCalInfo {

LONG lLLX;

LONG lLLY;

LONG lLRX;

LONG lLRY;

LONG lURX;

LONG lURY;

LONG lULX;

LONG lULY;

}CAL_INFO,*PCAL_INFO;

Members

lLLX

calibration parameter in X direction at lower left corner.

lLLY

calibration parameter in Y direction at lower left corner.

lLRX

calibration parameter in X direction at lower right corner.

lLRY

calibration parameter in Y direction at lower right corner.

lURX

calibration parameter in X direction at upper right corner.

lURY

calibration parameter in Y direction at upper right corner.

lULX

calibration parameter in X direction at upper left corner.

lULY

calibration parameter in Y direction at upper left corner.

See Also

SetCalInfo

GetCalInfo


CloseDevice

BOOL WINAPI CloseDevice(

HANDLE hFile

);

CloseDevice close the handle to the device which is open with CreateDevice. It returns TRUE if close successfully. Otherwise, it return FALSE.

Parameters

hFile Handle to the device open with CreateDevice

See Also

CreateDevice


CONST_TOUCHINFO

Constant touch information structure.

typedef struct tagTouchScopeInfo{

union

{

ULONG ulTouchScope;

ULONG ulRange;

};

union

{

ULONG ulCount;

ULONG ulDuration;

};

ULONG ulMode;

}TOUCH_SCOPE,CONST_TOUCHINFO,*PTOUCH_SCOPE,*PCONST_TOUCHINFO;

Members

ulTouchScope

constant touch parameter

ulRange

constant touch parameter

ulCount

constant touch parameter about pixel variation.

ulDuration

constant touch parameter which define the touch duration in milli-second for auto right click. If Auto Right Button function is enabled, the driver generates a right click after this duration time of constant touch.

ulMode

Flag to control the constant touch function enabled/disabled. This value must be set to either 0 or CONST_TOUCH_ENABLED

Remark

Driver does not generate mouse event for those touch points outside the specified area except the first touch or lift off point. In addition, the Auto Right Button function generate the right click according to the constant touch definition when Auto Right Button function was enabled.

See Also

IOCTL_SET_CONST_TOUCHINFO

SetConstToucnInfo

GetConstTouchInfo


Device IO Control Code

Device IO Control Code for eGalaxTouch Driver

IOCTL_SET_BRACNHFORMAT

IOCTL_GET_BRACNHFORMAT

IOCTL_GET_OIRENTATION

IOCTL_SET_OIRENTATION

IOCTL_SET_CALINFO

IOCTL_GET_CALINFO

IOCTL_SET_MOUSEMODE

IOCTL_GET_MOUSEMODE

IOCTL_SET_LINZINFO

IOCTL_GET_LINZINFO

IOCTL_SET_MONITORINFO

IOCTL_GET_MONITORINFO

IOCTL_SET_EDGEINFO

IOCTL_GET_EDGEINFO

IOCTL_SET_CONST_TOUCHINFO

IOCTL_GET_CONST_TOUCHINFO

IOCTL_SET_BEEPINFO

IOCTL_GET_BEEPINFO


CreateDevice

HANDLE WINAPI CreateDevice(

LPSTR szSymbolicName

);

CreateDevice open the eGalaxTouch device like Win32® API CreateFile. It returns a HANDLE to represent the device if it is successful. Otherwise, it returns NULL.

Paremeters

szSymbolicName

This symbolic name was obtained with EnumerateTouchInstance

Remark

Do not use Win32® API CloseHandle to close the device. Use CloseDevice instead of CloseHandle to close the device.

See Also

EnumerateTouchInstance

CloseDevice


Change Touchscreen Default Setting

User can change/modify the INF file to set/change the default setting for touchkit driver. Edit the “touchkit.inf” in the folder G:\Program Files\TouchKit. Locate the section [usb_AddReg] , [egxfilter.HW.AddReg] or [sertouch_Inst_AddReg] . You can attach some entry in this three sections.

example : if you want set Beep , you can attach this entry.

HKR,,"BeepMode",0x00010003,xxxxxxx

Set to 0x00000000 = Off Beep

Set to 0x00000001 = Beep when touched

Set to 0x00000002 = Beep when released

Value Name | Value | Description
BeepMode | 0x00000000 0x00000001 0x00000002 | Off Beep Beep when touched Beep when released
BeepFrequency | 0x00000064 ~0x00000FA0 | Beep Frequency
BeepDuration | 0x00000019 ~0x000001F4 | Beep duration
MouseMode | 0x80000000 0x40000000 0x20000000 0x10000000 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 | make driver to report right button. enable auto right button feature. disable driver to report mouse event. Set this flag to make driver to by pass the software filter to get more fast response. Default value of mouse emulation mode. set the mouse emulation mode to be “Click on Touch”. set the mouse emulation mode to be “Click on Release”. set the mouse emulation mode to be “Click On Touch No Move”. set the mouse emulation mode to be “click On Release No Move”.
ConstDuration | 0x00000000 ~0x00000078 ( 0 ~ 120 ) | constant touch parameter which define the touch duration in milli-second for auto right click.( 3Sec = 120 * 0.025 )
ConstRange | 0x00000020 ~0x000008C0 | constant touch parameter which define the touch range for auto right click. ( 1 pixel = 0x00000020 >> 5)
EdgeInfo | 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 | lLeft (4 bytes) Edge compensation parameter in left side. lRight (4 bytes) Edge compensation parameter in right side. lTop (4 bytes) Edge compensation parameter in upper side lBottom (4 bytes) Edge compensation parameter in bottom side lOffsetX (4 bytes) Offset parameter in X direction. lOffsetY (4 bytes) Offset parameter in Y direction. ulMode (4 bytes) Flag to enable/disable edge compensation. This flag must be either 0 or 1


Include the touchscreen component to the platform image

After the components were created and added to the component database, The component name will be shown in the folder of Hardware/”mice and other pointing devices” when the Microsoft Target Designer launched. Then, just double click on the component “USB Touchscreen Controller(Universal)” (for USB controller ) or “Serial Touchscreen Controller(Professional)” and “TouchScreen Enumerator “( for serial RS232 controller ) or “Touchkit Filter” ( for PS2 controller )to add them to the platform image.

After added components , please press ‘Save’ button. Then, follow below steps to update image context.

  1. Select ‘ Configuration -> Upgrade Configuration ’ to upgrade components.
  2. Press ‘ Save ‘ button.
  3. Select ‘ Configuration -> Check Dependencies ’ .
  4. Select ‘ Configuration -> Build Target Image…’

The Embedded Windows XP image will be built.


DoCalibration

BOOL WINAPI DoCalibration (

HANDLE hFile,

HWND hParentWnd,

PVOID pContext,

MAP_CALLBACK_ROUTINE pCallbackRoutine );

DoCalibration do 4 points calibration for the touchscreen.

Parameters

hFile

Handle to the open device by CreateDevice.

hParentWnd

The parent window.

pContext

Caller prepared buffer to be passed to the caller prepared callback routine.

pCallbackRoutine

Caller prepared callback routine. Once the calibration is done, the callback

routine will be called. The Caller prepared buffer pContext, calibration result

information will be passed to this callback routine.

Remark

This calibration mapping can be finished successfully only DeviceThread was started .

with StartDeviceThread . This function creates a calibration window for 4 points calibration. The caller has to make sure that application has the Windows® message loop so that this calibration can work correctly.

See Also

DoLinearization

DoDrawTest


DoDrawTest

BOOL WINAPI DoDrawTest (

HANDLE hFile,

HWND hParentWnd,

PVOID pContext,

MAP_CALLBACK_ROUTINE pCallbackRoutine

);

DoDrawTest do draw test.

Parameters

hFile

Handle to the device open with CreateDevice.

hParentWnd

Parent Window

pContext

Caller prepared buffer. This buffer will be passed to the caller prepared

callback routine.

pCallbackRoutine

Caller prepared callback routine. This callback routine will be called after Drawtest terminated.

Remark

Draw test works only when the DeviceThread was started with StartDeviceThread . This function creates a GUI full screen window for draw test. Caller should make sure the application program has Window® Message Loop so that this function can work correctly.

See Also

DoCalibration

DoLinearization


DoLinearization

BOOL WINAPI DoLinearization(

HANDLE hFile,

HWND hParentWnd,

PVOID pContext,

MAP_CALLBACK_ROUTINE pCallbackRoutine

);

DoLinearization do 25 points linearization.

Parameters

hFile

Handle to the device open with CreateDevice.

hParentWnd

Parent widnow.

pContext

Caller prepared buffer. This buffer will be passed to the caller prepared callback routine.

pCallbackRoutine

Caller prepared callback routine. This callback will be called after the Linearization mapping was terminated.

Remark

The Linearization mapping can be finished successfully only DeviceThread was started with StartDeviceThread. This function creates a GUI full screen window for 25 points linearization. Caller has to make sure that the program has a Windows® message loop so that this function can work correctly.

See Also

DoCalibration

DoDrawTest


Build Driver Component for Embedded Windows XP

User can build Touckit driver component for embedded Windows XP. To build the driver component, the Microsoft Component Designer must be installed before the designer can build the software/driver packages for embedded Windows XP.

Then, follow below steps to build the components.

1.) Download the touchkit driver package for embedded Windows XP.

2.) Install the touchkit driver on the developing machine.

3.) Manually copy files.

Copy 3 files “touchkit.cat ", and "xAuto4PtsCal.exe”, and “beep.sys” manually to the folder where the touchkit software installed. For example, in G:\Program Files\TouchKit

4.) Create component with INF file

Launch Microsoft Component Designer. Select File->Import to import the device components from .inf file. Then, choose the INF file “touchkit.inf” in the folder under G:\Program Files\TouchKit. After importing touchkit.inf completed, 5 device driver components will be list as below

4.1 Serial Touchscreen Controller(Professional) :

Device driver component is for serial Touchkit controller.

4.2 USB Touchscreen Controller(Universal) :

Device component for USB controller with VID 0EEF and PID 0001.

4.3 USB Touchscreen Controller(Professional) :

Device driver component for USB controller with VID 0EEF and PID 0002

4.4 Touchkit Filter :

Device driver component for PS2 controller.

4.5 TouchScreen Enumerator :

Device driver component for serial controller.

Note: If you want install Serial Touchscreen Controller driver , you must configure both “Serial Touchscreen Controller(Professional)” and “TouchScreen Enumerator” components.

5.) Create a new repository for the component.

Then, setup the repository property as below. Developer must assign the source path to the folder where TouchKit was installed in the develop machine.

For example: G:\Program Files\TouchKit.

6.) Configure the device components.

Select the component “USB Touchscreen Controller(Universal)” for USB controller to set the properties of the component and assign the correct repository.

(if you want install RS232 Driver, you have to select “Serial Touchscreen Controller(Professional)” and “TouchScreen Enumerator”, and select “Touchkit Filter” for PS2 driver )

Note: The prototype for “TouchScreen Enumerator “ component must be “Device: Ports”. For Other components, the prototype must be “Device Mouse”

7.) Add Utility files to the component.

In addition to kernel mode driver, the calibration utility should be included for calibration and other option setting for touchscreen application.

Choose the files from the repository folder

Select all of the files in the folder to add to the component.

Modify and make sure the path for some files

a.) xAuto4PtsCal.exe %11

b.) touchkit.inf %17%

c.) touchkit.cat %12%

d.) xTouch.sys %12%

e.) sertouch.sys %12%

f.) egxfilter.sys %12%

g.) XTouch32Ex.dll %11%

h.) touchkitprop.dll %11%

i.) beep.sys %12%

8.) Add the registry resource for the component for some specific setting

Pls add 4 registry data for “TouchScreen Enumerator” Component if you are going to use RS232 serial interface controller.

I. Set Key value “ ErrorControl = 0x00000001 “

II. Set Key value “ ImagePath = system32\drivers\egxfilter.sys “

III. Set Key value “ Start = 0x00000003 “

IV. Set Key value “ Type = 0x00000001 “

If you need to launch 4-points calibration (xAuto4PtsCal.exe)after system first boot. Please set this Rigistry data.

( Note : no need to attach 4-points calibration for “TouchScreen Enumerator “ device component )

To Enable Beep function, please set these Rigistry data.

I. Set Key value “ ErrorControl = 0x00000001“

II. Set Key value “ Group = Base“

III. Set Key value “ Start = 0x00000001“

IV. Set Key value “ Tag = 0x00000002“

V. Set Key value “ Type = 0x00000001“

9.) Modify inf file for serial controller. (Only for RS232 controller)

Edit the “touchkit.inf” in the folder G:\Program Files\TouchKit. Locate the string “rundll32 xtouch32ex.dll, SearchSerialTouch XXX”. Where, XXX is the string to make the system scan the specified COM ports. For example , if xxx string is COM1 , Edit XXX string to be COM1, the system will scan COM1 for touchscreen controller only. If XXX string is COM1COM2, the system will scan both COM1 and COM2 for touchscreen at boot time.

10.) Save the component to component database

Tool->Component database manager to import current SLD file to the component database.


#define EDGE_ENABLED 0x00000001

EDGE_INFO

Edge compensation parameter.

typedef struct tagBoundCoeff{

LONG lLeft;

LONG lRight;

LONG lTop;

LONG lBottom;

LONG lOffsetX;

LONG lOffsetY;

ULONG ulMode;

}EDGE_INFO,BOUND_COEFF,*PBOUND_COEFF,*PEDGE_INFO;

Members

lLeft

Edge compensation parameter in left side.

lRight

Edge compensation parameter in right side.

lTop

Edge compensation parameter in upper side

lBottom

Edge compensation parameter in bottom side

lOffsetX

Offset parameter in X direction.

lOffsetY

Offset parameter in Y direction.

ulMode

Flag to enable/disable edge compensation. This flag must be either 0 or

EDGE_ENABLED.

Remark

This edge compensation parameter is used to compensate the edge nonlinearity or offset due to view angle.

See Also

IOCTL_SET_EDGEINFO

IOCTL_GET_EDGEINFO

SetEdgeInfo

GetEdgeInfo


EnableAutoRightButton

BOOL INAPI EnableAutoRightButton(

HANDLE hFile,

BOOL bEnable

);

EnableAutoRightButton enable/disable auto right button feature.

Parameters

hFile

Handle to the device open with CreateDevice.

bEnable

Enable or Disable the Auto right button function. TRUE to enable it and FALSE to

disable this Auto Right Button function.

Remark

The driver generates a right click event when the touchscreen was touch at the same point for a while if this Auto right Button function was enabled. Otherwise, driver does not generate such Right Click event.

See Aslo

EnableConstTouch


EnableConstTouch

BOOL WINAPI EnableConstTouch(

HANDLE hFile,

BOOL bEnable

);

EnableConstTouch enable/disable constant touch function.

Parameters

hFile

Hanlde to the device open with CreateDevice

bEnable

Enable or disable Constant Touch function.


EnableTouch

VOID WINAPI

EnableTouch(

HANDLE hFile,

BOOL bEnable

);

EnableTouch enable/disable touch function. Enable it, the driver report the touch event as a mouse event. Otherwise, the driver does not report the touch event as a mouse event.

Parameters

hFile

Hanlde to the device open with CreateDevice.

bEnable

Set it TRUE to enable mouse emulation function. and set FALSE to disable touch

mouse emulation function.

Remark

The driver always reads data from device and converts the touch event to mouse event and report to system. However, if touch function disabled, the driver does not report the touched mouse event to system.


EnumerateTouchInstance

DWORD WINAPI

EnumerateTouchInstance (

HWND hWnd,

PVOID pContext,

XTOUCH_ENUM_CALLBACK_PROC pCallback

);

EnumerateTouchInstance enumerates all of the eGalaxTouch devices in the system. It returns a

nonzero value for success. Otherwise, it returns 0.

Parameters

hWnd

Parent window handle. NULL for no parent window.

pContext

The pointer point to caller prepared memory. This address will be passed to the callback routine.

pCallback

Caller prepared callback routine. This callback routine will be called whenever the API enumerates a eGalaxTouch device.

Remark

Caller has to prepare a callback routine before call this API.

Example

Purpose: Disable Touch function for all of devices.

extern "C" BOOL WINAPI EnumerateTouchscreenCallback(

PVOID pContext,

LPSTR szSymbolicName,

UINT nType )

{

HANDLE hDevice;

hDevice = CreateDevice( szSymbolicName );

EnableTouch( hDevice, FALSE );

CloseDevice( hDevice );

return TRUE;

}

DWORD WINAPI DisableAllTouchDevice( VOID )

{

DWORD dwNumsOfDevices;

dwNumsOfDevices = EnumerateTouchInstance ( NULL, NULL, EnumerateTouchscreenCallback );

return dwNumsOfDevices;

}


XTOUCH_ENUM_CALLBACK_PROC

Prototype of device enumeration callback routine.

typedef BOOL ( WINAPI *XTOUCH_ENUM_CALLBACK_PROC)(

PVOID pContext,

LPSTR szSymbloicName,

UINT nType

);

Parameters

pContext

pointer to the caller prepared buffer for the callback routine.

szSymbolicName

The device symbolic Link Name the device enumerator enumerated. This

string can be used to open the device with CreateDevice.

nType

This parameter is not used.

See Also

EnumerateTouchInstance


IOCTL_GET_BRACNHFORMAT

GetBranchFormat

VOID WINAPI SetBranchFormat(

HANDLE hFile,

PBRANCH_INFO pInfo

);

SetBranchFormat set the data format report from driver.

Parameters

hFile

Hanlde to the device open with CreateDevice.

pInfo

value to control the output data format from driver.

Remark

Call can call this function to get the current driver output data format.

See Also

IOCTL_GET_BRANCHFORMAT

IOCTL_SET_BRANCHFORMAT

SetBranchFormat


GetCalInfo

BOOL WINAPI GetCalInfo(

HANDLE hFile,

PCAL_INFO pCalInfo

);

GetCalInfo gets the 4 points calibration from driver.

Parameters

hFile

Handle to the open device.

pCalInfo

Caller prepared buffer to save the calibration data from driver.

Remark

Application may get the 4 points calibration for specific purpose. For example, the application can get the calibration data and change its data for orientation correction for monitor rotation.

See Also

IOCTL_GET_CALINFO

IOCTL_SET_CALINFO

SetCalInfo


GetConstTouchInfo

BOOL INAPI GetConstTouchInfo(

HANDLE hFile,

PCONST_TOUCHINFO pConstTInfo

);

GetConstTouchInfo get constant touch information from driver.

Parameters

hFile

Handle to the device open with CreateDevice.

pConstTInfo

Constant touch data structure to define the constant touch behavior.

See Also

IOCTL_GET_CONST_TOUCHINFO

IOCTL_SET_CONST_TOUCHINFO

SetConstTouchInfo


GetEdgeInfo

BOOL WINAPI GetEdgeInfo(

HANDLE hFile,

PEDGE_INFO pEdgeInfo

);

GetEdgeInfo get the edge compensation information from driver.

Parameters

hFile

Handle to the device open with CreateDevice.

pEdgeInfo

Buffer for Edge compensation information.

See Also

IOCTL_GET_EDGEINFO

IOCTL_SET_EDGEINFO

SetEdgeInfo


GetLinzInfo

BOOL WINAPI GetLinzInfo(

HANDLE hFile,

PLINZ_INFO pLinzInfo

);

GetLinzInfo gets the 25 points linearization data from driver

Parameters

hFile

Handle to the open device.

pLinzInfo

Caller prepared buffer for LINZ_INFO.

See Also

IOCTL_SET_LINZINFO

IOCTL_GET_LINZINFO

SetLinzInfo


GetMonitorInfo32

BOOL WINAPI GetMonitorInfo32(

HANDLE hFile,

PMONITOR_INFO pMonitorInfo

);

GetMonitorInfo32 gets the monitor mapping information from driver.

Parameters

hFile

Handle to the open device.

pMonitorInfo

Monitor information.

Remark

Driver converts the touch points and maps them to specific monitor to generate mouse events according to the Monitor information.

See Also

IOCTL_SET_MONITORINFO

IOCTL_GET_MONITORINFO

SetMonitorInfo32


GetMouseMode

BOOL WINAPI GetMouseMode(

HANDLE hFile,

PMOUSEMODE pMouseMode

);

GetMouseMode gets the current mouse emulation mode.

Parameters

hFile

Handle to device open with CreateDevice.

pMouseMode

MOUSEMODE data structure buffer.

Remark

Caller can get the mouse emulation mode from driver and change the specific flag to change its behavior.

See Also

SetMouseMode


GetTouchBeepInfo

BOOL WINAPI GetTouchBeepInfo(

HANDLE hFile,

PBEEP_INFO pInfo

);

GetTouchBeepInfo get the touch beep information from driver.

Parameters

hFile

Handle to the device open with CreateDevice.

pInfo

Beep Information.

See Also

IOCTL_SET_BEEPINFO

SetTouchBeepInfo


IOCTL_GET_BEEPINFO

Control code to get Beep Information from driver. Caller calls Win32® API DeviceIoControl with this control code to get the Beep Information BEEP_INFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_BEEPINFO,

NULL,

0,

pBeepInfo,

sizeof( BEEP_INFO ),

&dwRet,

NULL );

See Aslo

IOCTL_SET_BEEPINFO

SetTouchBeepInfo

GetTouchBeepInfo


IOCTL_GET_BRACNHFORMAT

Control code to get the driver report data format. Caller calls Win32® API DeviceIoControl with this control code and BRANCH_INFO data to get the current report data format.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_BRACNHFORMAT,

NULL,

0,

pInfo,

sizeof( BRANCH_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_BRANCHFORMAT

SetBranchFormat

GetBranchFormat


IOCTL_GET_CALINFO

Control code to get the current 4 points calibration information from driver. Caller can call Win32® API DeviceIoControl with this control code to get the 4 points calibration information CAL_INFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_CALINFO,

NULL,

0,

pCalInfo,

sizeof( CAL_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_CALINFO

GetCalInfo

SetCalInfo


IOCTL_GET_CONST_TOUCHINFO

Control code to get the constant touch information from driver. Caller calls Win32® API DeviceIoControl with this control code to get the constant touch information CONST_TOUCHINFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_CONST_TOUCHINFO,

NULL,

0,

pConstTouchInfo,

sizeof( CONST_TOUCHINFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_CONST_TOUCHINFO

SetConstTouchInfo

GetConstTouchInfo


IOCTL_GET_EDGEINFO

Control code to get the Edge Compensation information from driver. Caller calls Win32® API DeviceIoControl with this control code to get the Edge Compensation information EDGE_INFO to driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_EDGEINFO,

NULL,

0,

pEdgeInfo,

sizeof( EDGE_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_EDGEINFO

SetEdgeInfo

GetEdgeInfo


IOCTL_GET_LINZINFO

Control code to get the 25 points linearization information from driver. Call can call Win32® API DeviceIoControl with this control code to get the linearization information LINZ_INFO from the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_LINZINFO,

NULL,

0

pLinzInfo,

sizeof( LINZ_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_LINZINFO

SetLinzInfo

GetLinzInfo


IOCTL_GET_MONITORINFO

Control code to get the current monitor information from driver. Call can call Win32® API DeviceIoControl with this control code to get the monitor information MONITOR_INFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_MONITORINFO,

NULL,

0,

pMonitorInfo,

sizeof( MONITOR_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_MONITORINFO

SetMonitorInfo32

GetMonitorInfo32


IOCTL_GET_MOUSEMODE

Control code to get the mouse emulation mode. Call can call Win32® API with control code the get current mouse emulation mode MOUSEMODE to the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_MOUSEMODE,

NULL,

0,

pMouseMode,

sizeof( MOUSEMODE ),

&dwRet,

NULL );

See Also

IOCTL_SET_MOUSEMODE

SetMouseMode

GetMouseMode


IOCTL_GET_OIRENTATION

IOCTL_GET_ORIENTATION

Control code to get the current orientation from driver. Caller can call Win32® API DeviceIoControl with this control code to get the orientation information ORIENT_INFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_GET_OIRENTATION,

NULL,

0,

pInfo,

sizeof( ORIENT_INFO ),

&dwRet,

NULL );

See Also

IOCTL_SET_ORIENTATION

SetOrientation


IOCTL_SET_BEEPINFO

Control code to set Beep Information to driver. Caller calls Win32® API DeviceIoControl with this control code to set the Beep Information BEEP_INFO to driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_BEEPINFO,

pBeepInfo,

sizeof( BEEP_INFO ),

NULL,

0,

&dwRet,

NULL );

See Aslo

IOCTL_GET_BEEPINFO

SetTouchBeepInfo

GetTouchBeepInfo


IOCTL_SET_CALINFO

Control code to set the 4 points calibration information to driver. Caller can call Win32® API DeviceIoControl with control code to set the 4 points calibration information CAL_INFO to the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_CALINFO,

pCalInfo,

sizeof( CAL_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_CALINFO

SetCalInfo

GetCalInfo


IOCTL_SET_CONST_TOUCHINFO

Control code to set the constant touch information to driver. Caller calls Win32® API DeviceIoControl with this control code to set the constant touch information CONST_TOUCHINFO to driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_CONST_TOUCHINFO,

pConstTouchInfo,

sizeof( CONST_TOUCHINFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_CONST_TOUCHINFO

SetConstTouchInfo

GetConstTouchInfo


IOCTL_SET_EDGEINFO

Control code to set the Edge Compensation information to driver. Caller calls Win32® API DeviceIoControl with this control code to set the Edge Compensation information EDGE_INFO to driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_EDGEINFO,

pEdgeInfo,

sizeof( EDGE_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_EDGEINFO

SetEdgeInfo

GetEdgeInfo


IOCTL_SET_LINZINFO

Control code to set the 25 points linearization information to driver. Call can call Win32® API DeviceIoControl with this control code to set the linearization information LINZ_INFO to the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_LINZINFO,

pLinzInfo,

sizeof( LINZ_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_LINZINFO

SetLinzInfo

GetLinzInfo


IOCTL_SET_MONITORINFO

Control code to set the monitor information to driver. Call can call Win32® API DeviceIoControl with this control code to set the monitor information MONITOR_INFO to the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_MONITORINFO,

pMonitorInfo,

sizeof( MONITOR_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_MONITORINFO

SetMonitorInfo32

GetMonitorInfo32


IOCTL_SET_MOUSEMODE

Control code to set the mouse emulation mode. Call can call Win32® API with control code the set mouse emulation mode MOUSEMODE to the driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_MOUSEMODE,

pMouseMode,

sizeof( MOUSEMODE ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_MOUSEMODE

SetMouseMode

GetMouseMode


IOCTL_SET_ORIENTATION

Control code to set the orientation information to driver. Caller can call Win32® API DeviceIoControl with this control code to get the orientation information ORIENT_INFO from driver.

Example

DeviceIoControl( m_hFile,

IOCTL_SET_OIRENTATION,

pInfo,

sizeof( ORIENT_INFO ),

NULL,

0,

&dwRet,

NULL );

See Also

IOCTL_GET_ORIENTATION

SetOrientation


LINZ_INFO

Linearization parameter information

typedef struct tagDeltaParam {

INT dx;

INT dy;

}DELTA_PARAM,*PDELTA_PARAM;

typedef struct tagLinzInfo {

CAL_INFO Cal;

DELTA_PARAM Linz[5][5]; // 25 points calibration

}LINZ_INFO,*PLINZ_INFO;

Members

dx

variation parameter in X direction at target point.

dy

variation parameter in Y direction at target point.

Cal

Calibration parameters at 4 corner.

Linz

25 points linearization parameters.

See Also

IOCTL_SET_LINZINFO

IOCTL_GET_LINZINFO

SetLinzInfo

GetLinzInfo


MAP_CALLBACK_ROUTINE

Mapping callback routine.

typedef BOOL (WINAPI *MAP_CALLBACK_ROUTINE)(

PVOID pContext,

WPARAM wParam,

LPARAM lParam

);

Parameters

pContext

Caller prepared buffer.

wParam

value to indicate EEPROM verify ok or not.

lParam

a pointer to MAP_RESULT structure to inform caller the status of last operation.


MAP_RESULT

Data struct to indicate the operation status.

typedef struct tagMAPResult {

HWND hWnd;

HANDLE hFile;

ULONG ulMapType;

ULONG ulMapStatus;

}MAP_RESULT, *PMAP_RESULT;

Members

hWnd

The window to notified.

hFile

Handle to the open device via CreateDevice.

ulMapType

The map type of the operation. The value can be one of the following value.

MAP_TYPE_CALIBRATION

It indicates 4 points calibration done.

MAP_TYPE_LINEARIZATION

It indicates 25 points linearization done.

MAP_TYPE_DRAWTEST

It indicates drawtest done.

ulMapStatus

This value indicate the result of last map operation. This value can be one of following value.

MAPR_STATUS_UNCALED

Indicate that the last operation was not finished.

MAPR_STATUS_SUCCESS

Indicate that the last operation was finished successfully.

MAPR_STATUS_SURPRISE_REMOVED

Indicate that last operation was terminated due to device surprise removal.

MAPR_STATUS_TIMEOUT

Indicate that the last operation was terminated due to time out.

MAPR_STATUS_INTERRUPTED_BY_USER

Indicate that the last operation was terminated by user.

MAPR_STATUS_PARAM_OVERFLOW

Indicate that the last operation was terminated due to parameter overflow.

MAPR_STATUS_REMOVED

Indicate that the last operation was terminated due to device removed.


MONITOR_INFO

Monitor information.

typedef struct tagRect{

LONG lLeft;

LONG lTop;

LONG lRight;

LONG lBottom;

}RECTANGLE,*PRECTANGLE;

typedef struct tagMonitorInfo{

ULONG ulIndex;

ULONG ulMode;

RECTANGLE rcMonitor;

RECTANGLE rcWorking;

RECTANGLE rcVirtualDesktop;

CHAR szDeviceName[ DISPLAY_NAME_LEN ] ;

}MONITOR_INFO,*PMONITOR_INFO;

Members

ulIndex

Index to indicate which monitor to be mapped to.

ulMode

parameter to define the monitor mode. The mode can be the following combination

MONITOR_MULTIPLE_ENABLED

Set this flag to enable multiple monitor operation. When this bit was set, the

RECTANGLE variables must be set correctly to make driver work correctly.

MONITOR_SPLIT_ENABLED

Set this flag to enable split display function. This flag is valid only when MONITOR_MULTIPLE_ENABLED was set.

MONITOR_AREA_ANY

Set this flag the work anywhere on the monitor.

rcMonitor

monitor location.

rcWorking

the working area of the monitor.

rcVirtualDesktop

the system virtual desktop area.

szDeviceName

the device name of the mapped monitor.

See Also

IOCTL_SET_MONITORINFO

IOCTL_GET_MONITORINFO

GetMonitorInfo32

SetMonitorInfo32


typedef struct tagMonitorMapInfo

MONITORMAP_INFO

MonitorMap Info structure.

typedef struct tagMonitorMapInfo{

UINT nMonitorIndex;

UINT nMapStatus;

HANDLE hFile;

HWND hParentWnd;

RECT rcMonitor;

}MONITORMAP_INFO,*PMONITORMAP_INFO;

Members

nMonitorIndex

Monitor Index.

nMapStatus

Mapping status.

hFile

Handle to the device open with CreateDevice

hParentWnd

Parent window

rcMonitor

monitor rectangle location.

Remark


typedef struct tagMouseMode

MOUSEMODE

Mouse mode parameter to control mouse emulation behavior.

typedef struct tagMouseMode {

ULONG ulMouseMode;

ULONG ulTouchSpeed;

ULONG ulTouchGridSize;

}MOUSEMODE,*PMOUSEMODE;

Members

ulMouseMode

Flags to control mouse emulation behavior. This can be the combination of the

following flags.

MOUSEMODE_RBUTTON

Set this flag to make driver to report right button.

MOUSEMODE_AUTORIGHTBUTTON

Set this flag to enable auto right button feature. The driver reports a right click event when the touchscreen was pressed at the same point for a while. The duration can be controlled by the CONST_TOUCHINFO.

MOUSEMODE_DISABLED

Set this flag to disable driver to report mouse event.

MOUSEMODE_STABLIZED_CURSOR_DISABLED

Set this flag to make driver to by pass the software filter to get more

fast response. Set this flag cause cursor less stable.

MOUSEMODE_NORMAL

Default value of mouse emulation mode.

MOUSEMODE_CLICKONTOUCH_MOVE

Set this flag to set the mouse emulation mode to be “Click on

Touch”. In this mode, the cursor track the touch point.

MOUSEMODE_CLICKONRELEASE_MOVE

Set this flag to set the mouse emulation mode to be “Click on Release”. In this mode, the cursor track the touch point.

MOUSEMODE_CLICKONTOUCH

Set this flag to set the mouse emulation mode to be “Click On Touch No Move”. In this mode, the cursor does not track the touch point.

MOUSEMODE_CLICKONRELEASE

Set this flag to set the mouse emulation mode to be “click On Release No Move”. In this mode, cursor does not track the touch point.

ulTouchSpeed

value to define the double click speed. Not used for driver version 4.0 or later!

ulTouchGridSize

value to define the double click area. Not used for driver version 4.0 or later!

See Also

IOCTL_SET_MOUSEMODE

IOCTL_GET_MOUSEMODE

SetMouseMode

GetMouseMode


ORIENT_INFO

typedef ULONG ORIENT_INFO;

Information indicates the current monitor orientation. This value can be one of the following value.

Flags

ORIENT_NORMAL

Monitor in first quarter orientation.

ORIENT_QUAD1

Same as ORIENT_NORMAL

ORIENT_QUAD2

The monitor was rotated by 90 degrees with respect to the orientation of calibration or linearization at last time.

ORIENT_QUAD3

The monitor was rotated by 180 degrees with respect to the orientation of calibration or linearization at last time.

ORIENT_QUAD4

The monitor was rotated by 270 degrees with respect to the orientation of calibration or linearization at last time.

See Also

IOCTL_GET_ORIENTATION

IOCTL_SET_ORIENTATION

SetOrientation


RegisterDeviceRemovalHook

DWORD WINAPI

RegisterDeviceRemovalHook(

HANDLE hFile,

HWND hWnd,

UINT imsg

);

RegisterDeviceRemovalHook registers a notification message to notify the program when

the device was removed. it returns a nonzero value if it is successful. The caller should keep

this value for unregister.

Parameters

hFile

Handle to the device open with CreateDevice.

hWnd

The target window to receive the caller defined removal message.

imsg

The message sent to the target window when the device is removed.

Remark

The caller can register the removal notification. Whenever the application program receives the device removal notification, it should CloseDevice as soon.

See Also

RegisterTPNotifyMessage


RegisterTPNotifyMessage

DWORD WINAPI

RegisterTPNotifyMessage(

HANDLE hFile,

HWND hWnd,

UINT imsg

);

RegisterTPNotifyMessage registers a notification message for touch event so that the window can receive the message whenever touch event happens.

Parameters

hFile

Device handle obtained by CreateDevice

hWnd

Target window to receive the caller defined message when touch event happened.

imsg

Caller defined message.

Remark

The Target window will receive the caller defined message whenever the touchscreen

was touched. With this caller defined message, wParam is the touch proximity state, LOWORD( lParam) is X coordination, and HIWORD(lParam) is Y coordination. The coordination data is always scaled to 0~65535 for the driver before version 5.0.1.5310. When working with driver version 5.0.1.5310 or later, the coordination data is not scaled. Instead, the value range depends on the AD resolution shown in wParam.

The window can receive the caller defined message only when the device thread was started with StartDeviceThread.

Driver, version 5.0.1.5310 or later, supports multiple ADC resolution, multi-user, pressure. Such information can be obtained in wParam

wParam is a 32 bits data described as below

B31 B24 B23 B16

Player ID

pressure

B15~B8

0

Z

M

0

0

AD1

AD0

Status

Z = 1, B16~B23 is 8 bits pressure information

M= 1, B24~B31 is 8 bits multi-user player ID

AD1:AD0 = resolution of the coordination data.

AD1:AD0 = 0:0 11 bits resolution

AD1:AD0 = 0:1 12 bits resolution

AD1:AD0 = 1:0 13 bits resolution

AD1:AD0 = 1:1 14 bits resolution

See Also

RegisterDeviceRemovalHook


RestartFirmware

BOOL WINAPI RestartFirmware(

HANDLE hFile

);

RestartFirmware soft restart the device firmware.

Parameters

hFile

Handle to the open device.

Remark

RestartFirmware cause firmware to restart. Caller may change some parameters in EEPROM and force the firmware to restart to validate EEPROM.


SetBranchFormat

VOID WINAPI SetBranchFormat(

HANDLE hFile,

PBRANCH_INFO pInfo

);

SetBranchFormat set the data format report from driver.

Parameters

hFile

Hanlde to the device open with CreateDevice.

pInfo

value to control the output data format from driver.

Remark

Call can call this function to control the output data format from driver.

See Also

IOCTL_GET_BRANCHFORMAT

IOCTL_SET_BRANCHFORMAT

GetBranchFormat


SetCalInfo

VOID WINAPI SetCalInfo(

HANDLE hFile,

PCAL_INFO pCalInfo

);

SetCalInfo set 4 points calibration data to the driver.

Parameters

hFile

Handle to the open device.

pCalInfo

buffer for 4 points calibration data structure.

Remark

Driver converts the raw data input from the device to the mouse event according to the 4 points calibration data. After calling this API, this new data will be saved in registry and is valid right away.

See Also

IOCTL_GET_CALINFO

IOCTL_SET_CALINFO

GetCalInfo

SetLinzInfo


SetConstTouchInfo

VOID WNAPI SetConstTouchInfo(

HANDLE hFile,

PCONST_TOUCHINFO pConstTInfo

);

SetConstTouchInfo set constant touch information.

Parameters

hFile

Handle to the device open with CreateDevice.

pConstTInfo

buffer for CONST_TOUCHINFO to set the constant touch information.

Remark

SetConstTouchInfo to define the constant touch area. The driver does not generate mouse event if the touch point variation is within the constant touch area.

See Also

IOCTL_SET_CONST_TOUCHINFO

IOCTL_GET_CONST_TOUCHINFO

GetConstTouchInfo


SetEdgeInfo

VOID WINAPI SetEdgeInfo(

HANDLE hFile,

PEDGE_INFO pEdgeInfo

);

SetEdgeInfo set the edge compensation information to driver.

Parameters

hFile

Handle to open device.

pEdgeInfo

Edge compensation information.

See Also

IOCTL_SET_EDGEINFO

IOCTL_GET_EDGEINFO

GetEdgeInfo


SetLinzInfo

VOID WINAPI SetLinzInfo(

HANDLE hFile,

PLINZ_INFO pLinzInfo

);

SetLinzInfo set the 25 points calibration data to the driver.

Parameters

hFile Handle to the open device

pLinzInfo Pointer to the 25 points linearization data

Remark

The driver will correct the touchscreen linearity and orientation according to the 25 points linearization data.

See Also

IOCTL_SET_LINZINFO

IOCTL_GET_LINZINFO

GetLinzInfo


SetMonitorInfo32

VOID WINAPI SetMonitorInfo32(

HANDLE hFile,

PMONITOR_INFO pMonitorInfo

);

SetMonitorInfo32 set the monitor mapping information to the driver.

Parameters

hFile

Handle to the device open with CreateDevice.

pMonitorInfo

monitor mapping information.

Remark

Get the current monitor mapping information for the device.

See Also

IOCTL_GET_MONITORINFO

IOCTL_SET_MONITORINFO

GetMonitorInfor32


SetMouseMode

VOID WINAPI SetMouseMode(

HANDLE hFile,

PMOUSEMODE pMoudeMode

);

SetMouseMode set the driver mouse emulation mode.

Parameters

hFile

Handle to the device. open with CreateDevice.

pMouseMode

Mouse emulation mode.

See Also

IOCTL_SET_MOUSEMODE

IOCTL_GET_MOUSEMODE

GetMouseMode


TOUCH32API VOID WINAPI SetOrientation( HANDLE hFile, PORIENT_INFO pInfo )

SetOrientation

VOID WINAPI SetOrientation(

HANDLE hFile,

PORIENT_INFO pInfo

);

SetOrientation set the orientation information to the driver so that the driver can correct the orientation to map into the monitor. Then, it does not need to do calibration when the monitor was rotated.

Parameters

hFile

Handle to the device open with CreateDevice.

pInfo

Orientation information.

See Also

IOCTL_SET_ORIENTATION

IOCTL_GET_OIRENTATION


SetTouchBeepInfo

VOID WINAPI SetTouchBeepInfo(

HANDLE hFile,

PBEEP_INFO pInfo

);

SetTouchBeepInfo set touch beep information.

Parameters

hFile

Handle to the device open with CreateDevice.

pInfo

Beep Information.

See Also

IOCTL_SET_BEEPINFO

IOCTL_GET_BEEPINFO

GetTouchBeepInfo


StartDeviceThread

BOOL WINAPI

StartDeviceThread(

HANDLE hFile

);

StartDeviceThread starts the device thread to read data from controller.

Parameters

hFile Handle to the device open with CreateDevice

Remark

This device thread read the data from device. This device thread posts touch event to the registered window with the caller defined message. This function return TRUE if it is successful. Otherwise, it return FALSE.

See Also

StopDeviceThread


StopDeviceThread

BOOL WINAPI

StopDeviceThread(

HANDLE hFile

);

StopDeviceThread stops the device thread.

Parameters

hFile Handle to the device open with CreateDevice

Remark

This function stops the started device thread.

See Also

StartDeviceThread


UpdateControllerCalInfo

BOOL WINAPI UpdateControllerCalInfo(

HANDLE hFile,

PCAL_INFO pCalInfo,

BOOL bShowProgress

);

UpdateControllerCalInfo update the calibration information in EEPROM of controller.

Parameters

hFile

Handle to the device open with CreateDevice.

pCalInfo

The 4 points calibration to be updated in EEPROM.

bShowProgress

Show of hide the progress dialog.

Remark

Call this function to update the EEPROM context. This function can work correctly only when the device thread was started with StartDeviceThread. bShowProgress can be set to TRUE only the program has Windows Message Loop.

See Also

UpdateControllerLinzInfo


UpdateControllerLinzInfo

BOOL WINAPI UpdateControllerLinzInfo(

HANDLE hFile,

PLINZ_INFO pLinzInfo,

BOOL bResetCal,

BOOL bShowProgress

);

UpdateControllerLinzInfo update 25 points calibration parameters in EEPROM of controller.

Parameters

hFile

Handle to the device open with CreateDevice.

pLinzInfo

25 points linearization data used to update the EEPROM context.

bResetCal

set the 4 points calibration data to default value or not

bShowProgress

show or hide the progress dialog during context update.

Remark

Caller can call this function to update the EEPROM context. This function can work correctly only when the device thread was started with StartDeviceThread. bShowProgress can be set TRUE only when the program has Windows Message Loop.

See Also

UpdateControllerCalInfo


VerifyEEPROM

BOOL WINAPI VerifyEEPROM(

HANDLE hFile,

BOOL bShowProgress

);

VerifyEEPROM verify the EEPROM context in the controller.

Parameters

hFile

Handle to the device open with CreateDevice.

bShowProgress

Show/Hide the progress dialog during verify

Remark

Call this function the verify the context of EEPROM in the controller module. The EEPROM context must be configured properly. Otherwise, the firmware will reset them to the default value.