Difference between revisions of "Unit GoodixTouch"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''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 ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Goodix specific constants''' <code> GOODIX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GOODIX_TOUCH_DESCRIPTION = 'Goodix Touch Controller';</code>
 +
| style="width: 50%;"|Description of Goodix Touch device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_MAX_HEIGHT = 4096;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_MAX_WIDTH = 4096;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_INT_TRIGGER = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_CONTACT_SIZE = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_MAX_CONTACT_SIZE = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_MAX_CONTACTS = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_MAX_KEYS = 7;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_CONFIG_MIN_LENGTH = 186;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_CONFIG_911_LENGTH = 186;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_CONFIG_967_LENGTH = 228;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_CONFIG_GT9X_LENGTH = 240;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_CONFIG_MAX_LENGTH = 240;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Goodix I2C clock rate''' <code> GOODIX_I2C_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GOODIX_I2C_RATE = 400000;</code>
 +
| style="width: 50%;"|Default I2C clock rate
 +
|-
 +
| <code>GOODIX_CONFIG_TIMEOUT = 3000;</code>
 +
| style="width: 50%;"|Timeout to wait for firmware ready
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Goodix register commands''' <code> GOODIX_REG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GOODIX_REG_COMMAND = $8040;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>GOODIX_CMD_SCREEN_OFF = $05;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_READ_COOR_ADDR = $814E;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_GT1X_REG_CONFIG_DATA = $8050;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_GT9X_REG_CONFIG_DATA = $8047;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_REG_ID = $8140;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_BUFFER_STATUS_READY = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_HAVE_KEY = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_BUFFER_STATUS_TIMEOUT = 20;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_ID_MAX_LEN = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GOODIX_RESOLUTION_OFFSET = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_MAX_CONTACTS_OFFSET = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GOODIX_TRIGGER_OFFSET = 6;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>GOODIX_IRQ_TRIGGERS:array[0..3] of LongWord = (GPIO_TRIGGER_RISING,GPIO_TRIGGER_FALLING,GPIO_TRIGGER_LOW,GPIO_TRIGGER_HIGH);</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''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>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>LastKeys:LongWord;</code>
 +
| Keys reported in last input report
 +
|-
 +
| <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 ===
 
----
 
----
  
''To be documented''
+
 
 +
'''Goodix specific variables'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_SWAP_CONFIG_XY:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_SWAP_REPORT_XY:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_INVERT_REPORT_X:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_INVERT_REPORT_Y:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_LOAD_CONFIG_FILE:String;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>GOODIX_RESET_CONTROLLER:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''Initialization functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure GOODIXInit;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the Goodix Touch unit and parameters</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Called internally by other functions
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Goodix functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GOODIXTouchCreate(I2C:PI2CDevice; Address:Word; Width,Height:LongWord; IRQ,RST:PGPIOInfo):PTouchDevice;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new Goodix Touch device connected to the specified I2C device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! I2C
 +
| The I2C device this Goodix Touch device is connected to
 +
|-
 +
! Address
 +
| The I2C address for this Goodix Touch device
 +
|-
 +
! Width
 +
| The width of the screen in pixels (When set at TOUCH_ROTATION_0)
 +
|-
 +
! Height
 +
| The height of the screen in pixels (When set at TOUCH_ROTATION_0)
 +
|-
 +
! IRQ
 +
| The GPIO information for the IRQ line (Optional)
 +
|-
 +
! Return
 +
| Pointer to the new Touch device or nil on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GOODIXTouchDestroy(Touch:PTouchDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Stop, deregister and destroy a Goodix Touch device created by this driver</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Touch
 +
| The Touch device to destroy
 +
|-
 +
! Return
 +
| ERROR_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Goodix touch functions'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GOODIXTouchStart(Touch:PTouchDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStart API for Goodix Touch device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use TouchDeviceStart instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GOODIXTouchStop(Touch:PTouchDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStop API for Goodix Touch device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use TouchDeviceStop instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GOODIXTouchUpdate(Touch:PTouchDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceUpdate API for Goodix Touch device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications, use TouchDeviceUpdate instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure GOODIXTouchCallback(Touch:PGOODIXTouch; Pin,Trigger:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Touch device event callback (Interrupt) handler for Goodix Touch device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 03:25, 24 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



Goodix specific constants GOODIX_*
GOODIX_TOUCH_DESCRIPTION = 'Goodix Touch Controller'; Description of Goodix Touch device
 
GOODIX_MAX_HEIGHT = 4096;  
GOODIX_MAX_WIDTH = 4096;  
GOODIX_INT_TRIGGER = 1;  
GOODIX_CONTACT_SIZE = 8;  
GOODIX_MAX_CONTACT_SIZE = 9;  
GOODIX_MAX_CONTACTS = 10;  
GOODIX_MAX_KEYS = 7;  
 
GOODIX_CONFIG_MIN_LENGTH = 186;  
GOODIX_CONFIG_911_LENGTH = 186;  
GOODIX_CONFIG_967_LENGTH = 228;  
GOODIX_CONFIG_GT9X_LENGTH = 240;  
GOODIX_CONFIG_MAX_LENGTH = 240;  


Goodix I2C clock rate GOODIX_I2C_*
GOODIX_I2C_RATE = 400000; Default I2C clock rate
GOODIX_CONFIG_TIMEOUT = 3000; Timeout to wait for firmware ready


Goodix register commands GOODIX_REG_*
GOODIX_REG_COMMAND = $8040;  
GOODIX_CMD_SCREEN_OFF = $05;  
 
GOODIX_READ_COOR_ADDR = $814E;  
GOODIX_GT1X_REG_CONFIG_DATA = $8050;  
GOODIX_GT9X_REG_CONFIG_DATA = $8047;  
GOODIX_REG_ID = $8140;  
 
GOODIX_BUFFER_STATUS_READY = (1 shl 7);  
GOODIX_HAVE_KEY = (1 shl 4);  
GOODIX_BUFFER_STATUS_TIMEOUT = 20;  
 
GOODIX_ID_MAX_LEN = 4;  
 
GOODIX_RESOLUTION_OFFSET = 1;  
GOODIX_MAX_CONTACTS_OFFSET = 5;  
GOODIX_TRIGGER_OFFSET = 6;  
 
GOODIX_IRQ_TRIGGERS:array[0..3] of LongWord = (GPIO_TRIGGER_RISING,GPIO_TRIGGER_FALLING,GPIO_TRIGGER_LOW,GPIO_TRIGGER_HIGH);


Type definitions



Goodix touch

PGOODIXTouch = ^TGOODIXTouch;

TGOODIXTouch = record

Touch Properties
Touch:TTouchDevice;  
I2C Properties
I2C:PI2CDevice; The I2C device this device is connected to
Address:Word; The I2C address of the device
General Properties
IRQ:TGPIOInfo; The GPIO information for the IRQ line (Optional)
RST:TGPIOInfo; The GPIO information for the Reset line (Optional)
MaxX:Word; Maximum X value from current configuration
MaxY:Word; Maximum Y value from current configuration
Width:Word; Screen width value supplied during create
Height:Word; Screen height value supplied during create
MaxPoints:LongWord; Maximum touch points from current configuration
LastKeys:LongWord; Keys reported in last input report
LastPoints:LongWord; Points reported in last input report
Goodix Properties
Id:String; ID String for this device
Version:Word; Version number for this device
ConfigAddress:Word; Configuration data address
ConfigLength:LongWord; Configuration data length in bytes
ChecksumSize:LongWord; Configuration checksum size
ContactSize:LongWord; Size of each contact point coordinate in touch data
Configuration:array[0..GOODIX_CONFIG_MAX_LENGTH - 1] of Byte;  
KeyCodes:array[0..GOODIX_MAX_KEYS - 1] of Word;  
ScanCodes:array[0..GOODIX_MAX_KEYS - 1] of Word;  
SwapConfigXY:Boolean; If True swap the max X and Y values in the configuration
SwapReportXY:Boolean; If True swap the X and Y values in the input report
InvertReportX:Boolean; If True invert the X value in the input report
InvertReportY:Boolean; If True invert the Y value in the input report
ConfigFilename:String; The configuration filename to load during initialization
ResetController:Boolean; If True reset the controller during initialization

GOODIX point data

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


Public variables



Goodix specific variables

GOODIX_SWAP_CONFIG_XY:Boolean;
GOODIX_SWAP_REPORT_XY:Boolean;
GOODIX_INVERT_REPORT_X:Boolean;
GOODIX_INVERT_REPORT_Y:Boolean;
GOODIX_LOAD_CONFIG_FILE:String;
GOODIX_RESET_CONTROLLER:Boolean;


Function declarations



Initialization functions

procedure GOODIXInit;
Description: Initialize the Goodix Touch unit and parameters
Note Called internally by other functions


Goodix functions

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
I2C The I2C device this Goodix Touch device is connected to
Address The I2C address for this Goodix Touch device
Width The width of the screen in pixels (When set at TOUCH_ROTATION_0)
Height The height of the screen in pixels (When set at TOUCH_ROTATION_0)
IRQ The GPIO information for the IRQ line (Optional)
Return Pointer to the new Touch device or nil on failure


function GOODIXTouchDestroy(Touch:PTouchDevice):LongWord;
Description: Stop, deregister and destroy a Goodix Touch device created by this driver
Touch The Touch device to destroy
Return ERROR_SUCCESS if completed or another error code on failure


Goodix touch functions

function GOODIXTouchStart(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStart API for Goodix Touch device
Note Not intended to be called directly by applications, use TouchDeviceStart instead.


function GOODIXTouchStop(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStop API for Goodix Touch device
Note Not intended to be called directly by applications, use TouchDeviceStop instead.


function GOODIXTouchUpdate(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceUpdate API for Goodix Touch device
Note Not intended to be called directly by applications, use TouchDeviceUpdate instead.


procedure GOODIXTouchCallback(Touch:PGOODIXTouch; Pin,Trigger:LongWord);
Description: Touch device event callback (Interrupt) handler for Goodix Touch device
Note Not intended to be called directly by applications


Return to Unit Reference