IPC@CHIP® Graphics Library – API Documentation

Header image

Main page


Touch Panel Functions

This section provides functions for controlling the touch panel controller. More...

Functions

GcErrorCode gcGetTouchPosRaw (short *x, short *y)
 Get the raw touch position (for calibration only).
GcErrorCode gcLoadTouchInitParams (GcTouchInitParams *params)
 Load touch calibration parameters.
GcErrorCode gcSaveTouchInitParams (const GcTouchInitParams *params)
 Save touch calibration parameters.
GcErrorCode gcEnableTouch (BOOL enable)
 Enable/disable touch processing.
GcErrorCode gcInitTouch (const GcTouchInitParams *params, GcTouchCallback callback)
 Initialise touch panel.
GcErrorCode gcDeinitTouch (void)
 De-initialise touch panel.

Detailed Description

The IPC@CHIP® Graphics Controllers feature a touch panel controller, which can be connected to 4-wire resistive touch panels. The graphics library encapsulates the control of the touch panel controller and provides a convenient way to work with the touch panel.

Basically a callback function will be registered, that will be called each time a touch event occurs. The callback function will be handed the actual x/y coordinates.

Touch Panel Calibration

Since it is necessary to calibrate each touch panel, before it can be used, this section of the graphics library also provides means to perform the calibration and to save the calibration values (and of course also to load it).

You can download the example program touchcal.exe from the IPC@CHIP® website's download section. This program demonstrates how to calibrate a touch panel.

What Do You Have To Do To Calibrate A Touch Panel

You need to determine six calibration values, which will laster be passed to the function gcInitTouch() in an object of the structure data type GcTouchInitParams. These are:

Raw x/y coordinates can be gotten using the function gcGetTouchPosRaw(). Use the function gcSaveTouchInitParams() and gcLoadTouchInitParams() to save the values resp. load them.






Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Tue Jun 27 14:21:34 2017 by Doxygen 1.6.1