FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
244
Copyright © Bridgetek Limited
To draw a dial with tag 33 centered at (80, 60), adjustable by touch:
uint16_t angle = 0x8000;
cmd_track(80, 60, 1, 1, 33);
while (1) {
...
cmd(TAG(33));
cmd_dial(80, 60, 55, 0, angle);
...
uint32_t tracker = rd32(REG_TRACKER);
if ((tracker & 0xff) == 33)
angle = trackeI> 16;
...
}
To make an adjustable slider with tag 34:
uint16_t val = 0x8000;
cmd_track(20, 50, 120, 8, 34);
Ile (1) {
...
cmd(TAG(34));
cmd_slider(20, 50, 120, 8, val, 65535);
...
uint32_t tracker = rd32(REG_TRACKER);
if ((tracker & 0xff) == 33)
val = tracker >> 16;
...
}
–