Difference between revisions of "Unit GoodixTouch"

From Ultibo.org
Jump to: navigation, search
 
Line 87: Line 87:
 
| <code>GOODIX_I2C_RATE = 400000;</code>
 
| <code>GOODIX_I2C_RATE = 400000;</code>
 
| style="width: 50%;"|Default I2C clock rate
 
| style="width: 50%;"|Default I2C clock rate
 +
|-
 +
| <code>GOODIX_CONFIG_TIMEOUT = 3000;</code>
 +
| style="width: 50%;"|Timeout to wait for firmware ready
 
|-
 
|-
 
|}
 
|}
Line 184: Line 187:
 
| <code>RST:TGPIOInfo;</code>
 
| <code>RST:TGPIOInfo;</code>
 
| The GPIO information for the Reset line (Optional)
 
| The GPIO information for the Reset line (Optional)
|-
 
| <code>Timer:TTimerHandle;</code>
 
| Handle for touch release timer
 
 
|-
 
|-
 
| <code>MaxX:Word;</code>
 
| <code>MaxX:Word;</code>
Line 202: Line 202:
 
| <code>MaxPoints:LongWord;</code>
 
| <code>MaxPoints:LongWord;</code>
 
| Maximum touch points from current configuration
 
| Maximum touch points from current configuration
 +
|-
 +
| <code>LastKeys:LongWord;</code>
 +
| Keys reported in last input report
 
|-
 
|-
 
| <code>LastPoints:LongWord;</code>
 
| <code>LastPoints:LongWord;</code>
Line 408: Line 411:
 
! Note
 
! Note
 
| Not intended to be called directly by applications, use TouchDeviceUpdate instead.
 
| 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 GOODIXTouchTimer(Touch:PGOODIXTouch);</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Touch device timer event 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
 
 
|-
 
|-
 
|}
 
|}

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



[Expand]
Goodix specific constants GOODIX_*


[Expand]
Goodix I2C clock rate GOODIX_I2C_*


[Expand]
Goodix register commands GOODIX_REG_*


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



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

[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 GOODIXTouchCallback(Touch:PGOODIXTouch; Pin,Trigger:LongWord);
Description: Touch device event callback (Interrupt) handler for Goodix Touch device


Return to Unit Reference