Difference between revisions of "Unit GoodixTouch"

From Ultibo.org
Jump to: navigation, search
Line 43: Line 43:
 
----
 
----
  
''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 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
 +
|-
 +
|}
 +
</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]]

Revision as of 06:19, 3 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


To be documented

Public variables


To be documented

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 GOODIXTouchTimer(Touch:PGOODIXTouch);
Description: Touch device timer event handler for Goodix Touch device
Note Not intended to be called directly by applications


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