FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
231
Copyright © Bridgetek Limited
5.47
CMD_CALIBRATE - execute the touch screen calibration
routine
The calibration procedure collects three touches from the touch screen, then computes
and loads an appropriate matrix into REG_TOUCH_TRANSFORM_A-F. To use it, create a
display list and then use CMD_CALIBRATE. The co-processor engine overlays the touch
targets on the current display list, gathers the calibration input and updates
REG_TOUCH_TRANSFORM_A-F.
C prototype
void cmd_calibrate( uint32_t result );
Parameters
result
output parameter; written with 0 on failure of calibration.
The completion of this function is detected when the value of REG_CMD_READ is equal
to REG_CMD_WRITE.
Command layout
+0
CMD_CALIBRATE(0xffffff15)
+4
result
Examples
cmd_dlstart
();
cmd
(
CLEAR
(
1
,
1
,
1
));
cmd_text
(
80
,
30
,
27
,
OPT_CENTER
,
"Please tap on the dot"
);
cmd_calibrate
();
Code snippet 14 CMD_CALIBRATE example