IPC@CHIP® Graphics Library – API Documentation
This section provides functions for controlling the touch panel controller. More...
|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. |
|De-initialise touch panel. |
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.
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.