Difference between revisions of "Unit RPIFT5406"
Line 59: | Line 59: | ||
---- | ---- | ||
− | '' | + | |
+ | '''RPiFT5406 touch point''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRPiFT5406TouchPoint = ^TRPiFT5406TouchPoint;</code> | ||
+ | |||
+ | <code>TRPiFT5406TouchPoint = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>xh:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>xl:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>yh:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>yl:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>res1:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>res2:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''RPiFT5406 registers''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRPiFT5406Registers = ^TRPiFT5406Registers;</code> | ||
+ | |||
+ | <code>TRPiFT5406Registers = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>DeviceMode:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>GestureId:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>NumPoints:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Point:array[0..RPIFT5406_MAX_POINTS - 1] of TRPiFT5406TouchPoint;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''RPiFT5406 touch''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PRPiFT5406Touch = ^TRPiFT5406Touch;</code> | ||
+ | |||
+ | <code>TRPiFT5406Touch = 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%;"| | ||
+ | |- | ||
+ | |colspan="2"|''RPiFT5406 Properties'' | ||
+ | |- | ||
+ | | <code>Thread:TThreadHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Terminate:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Registers:PRPiFT5406Registers;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 03:14, 25 January 2017
Return to Unit Reference
Description
Raspberry Pi FT5406 Touch Driver unit
This is the touchscreen driver for the Official Raspberry Pi 7" Touchscreen. While this device uses a FocalTech FT5406 10 point capactive touchscreen controller it is actually connected to the GPU and not directly accessible to the ARM processor.
In order to make the touchscreen data available the GPU provides a memory based interface that can be read by polling an address returned from a mailbox call.
The Linux driver uses a thread to poll the data approximately 60 times per second so this driver does something similar.
Constants
RPIFT5406_*
RPIFT5406_TOUCH_DESCRIPTION = 'Raspberry Pi FT5406 Touch Controller';
|
Description of RPiFT5406 Touch device |
RPIFT5406_THREAD_NAME = 'RPiFT5406 Touch';
|
Name of the RPiFT5406 Touch polling thread |
RPIFT5406_MAX_POINTS = 10;
|
|
RPIFT5406_MAX_X = $FFF;
|
|
RPIFT5406_MAX_Y = $FFF;
|
|
RPIFT5406_MAX_Z = 0;
|
|
RPIFT5406_SCREEN_WIDTH = 800;
|
|
RPIFT5406_SCREEN_HEIGHT = 480;
|
Type definitions
RPiFT5406 touch point
PRPiFT5406TouchPoint = ^TRPiFT5406TouchPoint;
TRPiFT5406TouchPoint = record
xh:Byte;
|
|
xl:Byte;
|
|
yh:Byte;
|
|
yl:Byte;
|
|
res1:Byte;
|
|
res2:Byte;
|
RPiFT5406 registers
PRPiFT5406Registers = ^TRPiFT5406Registers;
TRPiFT5406Registers = record
DeviceMode:Byte;
|
|
GestureId:Byte;
|
|
NumPoints:Byte;
|
|
Point:array[0..RPIFT5406_MAX_POINTS - 1] of TRPiFT5406TouchPoint;
|
RPiFT5406 touch
PRPiFT5406Touch = ^TRPiFT5406Touch;
TRPiFT5406Touch = record
Touch Properties | |
Touch:TTouchDevice;
|
|
RPiFT5406 Properties | |
Thread:TThreadHandle;
|
|
Terminate:Boolean;
|
|
Registers:PRPiFT5406Registers;
|
Public variables
None defined
Function declarations
Initialization functions
procedure RPiFT5406Init;
Note | Called only during system startup |
---|
RPiFT5406 touch functions
function RPiFT5406TouchStart(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStart instead |
---|
function RPiFT5406TouchStop(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStop instead |
---|
function RPiFT5406TouchExecute(Touch:PRPiFT5406Touch):PtrInt;
Note | Not intended to be called directly by applications |
---|
Return to Unit Reference