Difference between revisions of "Unit GoodixTouch"

From Ultibo.org
Jump to: navigation, search
Line 33: Line 33:
 
----
 
----
  
''To be documented''
+
 
 +
'''Goodix touch'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGOODIXTouch = ^TGOODIXTouch;</code>
 +
 
 +
<code>TGOODIXTouch = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Touch Properties''
 +
|-
 +
| <code>Touch:TTouchDevice;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|''I2C Properties''
 +
|-
 +
| <code>I2C:PI2CDevice;</code>
 +
| The I2C device this device is connected to
 +
|-
 +
| <code>Address:Word;</code>
 +
| The I2C address of the device
 +
|-
 +
|colspan="2"|''General Properties''
 +
|-
 +
| <code>IRQ:TGPIOInfo;</code>
 +
| The GPIO information for the IRQ line (Optional)
 +
|-
 +
| <code>RST:TGPIOInfo;</code>
 +
| The GPIO information for the Reset line (Optional)
 +
|-
 +
| <code>Timer:TTimerHandle;</code>
 +
| Handle for touch release timer
 +
|-
 +
| <code>MaxX:Word;</code>
 +
| Maximum X value from current configuration
 +
|-
 +
| <code>MaxY:Word;</code>
 +
| Maximum Y value from current configuration
 +
|-
 +
| <code>Width:Word;</code>
 +
| Screen width value supplied during create
 +
|-
 +
| <code>Height:Word;</code>
 +
| Screen height value supplied during create
 +
|-
 +
| <code>MaxPoints:LongWord;</code>
 +
| Maximum touch points from current configuration
 +
|-
 +
| <code>LastPoints:LongWord;</code>
 +
| Points reported in last input report
 +
|-
 +
|colspan="2"|''Goodix Properties''
 +
|-
 +
| <code>Id:String;</code>
 +
| ID String for this device
 +
|-
 +
| <code>Version:Word;</code>
 +
| Version number for this device
 +
|-
 +
| <code>ConfigAddress:Word;</code>
 +
| Configuration data address
 +
|-
 +
| <code>ConfigLength:LongWord;</code>
 +
| Configuration data length in bytes
 +
|-
 +
| <code>ChecksumSize:LongWord;</code>
 +
| Configuration checksum size
 +
|-
 +
| <code>ContactSize:LongWord;</code>
 +
| Size of each contact point coordinate in touch data
 +
|-
 +
| <code>Configuration:array[0..GOODIX_CONFIG_MAX_LENGTH - 1] of Byte;</code>
 +
| &nbsp;
 +
|-
 +
| <code>KeyCodes:array[0..GOODIX_MAX_KEYS - 1] of Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ScanCodes:array[0..GOODIX_MAX_KEYS - 1] of Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SwapConfigXY:Boolean;</code>
 +
| If True swap the max X and Y values in the configuration
 +
|-
 +
| <code>SwapReportXY:Boolean;</code>
 +
| If True swap the X and Y values in the input report}
 +
|-
 +
| <code>InvertReportX:Boolean;</code>
 +
| If True invert the X value in the input report
 +
|-
 +
| <code>InvertReportY:Boolean;</code>
 +
| If True invert the Y value in the input report
 +
|-
 +
| <code>ConfigFilename:String;</code>
 +
| The configuration filename to load during initialization
 +
|-
 +
| <code>ResetController:Boolean;</code>
 +
| If True reset the controller during initialization
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GOODIX point data'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TGOODIXPointData = array[0..(2 + GOODIX_MAX_CONTACT_SIZE * GOODIX_MAX_CONTACTS) - 1] of Byte;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===

Revision as of 01:11, 5 August 2022

Return to Unit Reference


Description


Goodix I2C Touchscreen Driver unit

The GOODIX I2C controllers are a range of capacitive touchscreen controllers that include multipoint touch support and are used by a variety of small LCD displays. The exact features and capability of each device can be found by checking the datasheets which can be obtained online.

This driver is compatible with the following devices:

 goodix,gt1151
 goodix,gt5663
 goodix,gt5688
 goodix,gt911
 goodix,gt9110
 goodix,gt912
 goodix,gt9147
 goodix,gt917s
 goodix,gt927
 goodix,gt9271
 goodix,gt928
 goodix,gt9286
 goodix,gt967

Constants


To be documented

Type definitions



Goodix touch

[Expand]

PGOODIXTouch = ^TGOODIXTouch;

TGOODIXTouch = record

GOODIX point data

TGOODIXPointData = array[0..(2 + GOODIX_MAX_CONTACT_SIZE * GOODIX_MAX_CONTACTS) - 1] of Byte;


Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure GOODIXInit;
Description: Initialize the Goodix Touch unit and parameters


Goodix functions

[Expand]
function GOODIXTouchCreate(I2C:PI2CDevice; Address:Word; Width,Height:LongWord; IRQ,RST:PGPIOInfo):PTouchDevice;
Description: Create, register and start a new Goodix Touch device connected to the specified I2C device


[Expand]
function GOODIXTouchDestroy(Touch:PTouchDevice):LongWord;
Description: Stop, deregister and destroy a Goodix Touch device created by this driver


Goodix touch functions

[Expand]
function GOODIXTouchStart(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStart API for Goodix Touch device


[Expand]
function GOODIXTouchStop(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStop API for Goodix Touch device


[Expand]
function GOODIXTouchUpdate(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceUpdate API for Goodix Touch device


[Expand]
procedure GOODIXTouchTimer(Touch:PGOODIXTouch);
Description: Touch device timer event handler for Goodix Touch device


[Expand]
procedure GOODIXTouchCallback(Touch:PGOODIXTouch; Pin,Trigger:LongWord);
Description: Touch device event callback (Interrupt) handler for Goodix Touch device


Return to Unit Reference