30#define HEADER_HEIGHT 64
44#define GAUGE_RADIUS 115
53#define NAV_X (EVE_DISP_WIDTH - NAV_W - 14)
65#define ROUND_RADIUS 95
66#define DIAL_TEXT_X 600
69#define POPUP_X ((EVE_DISP_WIDTH - POPUP_W) / 2)
70#define POPUP_Y ((EVE_DISP_HEIGHT - POPUP_H) / 2)
71#define POPUP_RADIUS 16
81#define SLIDER_RANGE 100U
82#define FRAME_DELAY_MS 15U
83#define TRACKER_FULL 65536UL
85#define KEYPAD_KEYS "1234567890"
123 if (EVE_LIB_AwaitCoProEmpty() != 0)
125 printf(
"EVE: co-processor exception after %s.\r\n", step);
137 EVE_LIB_BeginCoProList();
139 EVE_CLEAR_COLOR_RGB(0, 0, 0);
141 EVE_COLOR_RGB(255, 255, 255);
142 EVE_CMD_TEXT(EVE_DISP_WIDTH / 2, EVE_DISP_HEIGHT / 2,
FONT_WIDGET,
143 EVE_OPT_CENTER,
"Tap the dots to calibrate touch");
144 EVE_CMD_CALIBRATE(0);
145 EVE_LIB_EndCoProList();
158 EVE_LIB_BeginCoProList();
162 EVE_LIB_EndCoProList();
175 uint8_t tag = EVE_LIB_MemRead8(EVE_REG_TOUCH_TAG);
176 uint32_t tracker = EVE_LIB_MemRead32(EVE_REG_TRACKER);
194 else if (newPress && (tag ==
TAG_NEXT))
198 else if (newPress && (tag ==
TAG_BACK))
215 else if (newPress && (tag >= (uint8_t)
'0') && (tag <= (uint8_t)
'9') && (
typedLength <
TYPED_MAX))
226 else if ((tracker & 0xFFFFUL) ==
TAG_DIAL)
242 EVE_COLOR_RGB(20, 40, 110);
243 EVE_BEGIN(EVE_BEGIN_RECTS);
247 EVE_COLOR_RGB(255, 255, 255);
258 EVE_CMD_FGCOLOR(0x3A5AC8UL);
282 EVE_CMD_FGCOLOR(0x2060C0UL);
287 EVE_COLOR_RGB(255, 255, 255);
290 EVE_OPT_CENTERY | EVE_OPT_FORMAT,
"Count: %d", (
int)
pressCount);
300 EVE_CMD_FGCOLOR(0xC0C0C0UL);
301 EVE_CMD_BGCOLOR(0x404040UL);
304 toggleOn ? 65535U : 0U,
"OFF\xffON");
309 EVE_COLOR_RGB(40, 230, 60);
313 EVE_COLOR_RGB(50, 60, 50);
316 EVE_BEGIN(EVE_BEGIN_POINTS);
329 EVE_COLOR_RGB(255, 255, 255);
330 EVE_CMD_BGCOLOR(0x202840UL);
336 EVE_CMD_BGCOLOR(0x404040UL);
341 EVE_CMD_FGCOLOR(0x2060C0UL);
352 uint32_t seconds = HAL_GetTick() / 1000UL;
353 char typedLine[
sizeof(
"Typed: ") +
TYPED_MAX];
357 EVE_COLOR_RGB(255, 255, 255);
361 (void)snprintf(typedLine,
sizeof(typedLine),
"Typed: %s",
typedDigits);
365 EVE_CMD_FGCOLOR(0x2060C0UL);
375 EVE_CMD_BGCOLOR(0x202840UL);
377 (uint16_t)((seconds / 3600UL) % 12UL), (uint16_t)((seconds / 60UL) % 60UL),
378 (uint16_t)(seconds % 60UL), 0U);
379 EVE_COLOR_RGB(255, 255, 255);
385 EVE_CMD_FGCOLOR(0x2060C0UL);
399 EVE_COLOR_RGB(30, 50, 120);
401 EVE_BEGIN(EVE_BEGIN_RECTS);
407 EVE_COLOR_RGB(255, 255, 255);
411 "Widget tour completed");
412 EVE_COLOR_RGB(190, 200, 230);
414 "Press reset to start over");
424 EVE_LIB_BeginCoProList();
426 EVE_CLEAR_COLOR_RGB(10, 14, 28);
436 drawHeader(
"BT817 Widget Tour - NUCLEO-H753ZI");
442 EVE_COLOR_RGB(160, 170, 190);
443 EVE_CMD_TEXT(EVE_DISP_WIDTH / 2, EVE_DISP_HEIGHT - 20,
FONT_SMALL, EVE_OPT_CENTER,
444 "Touch the button, the toggle and the slider");
454 EVE_LIB_EndCoProList();
469 printf(
"EVE: EVE_Init() failed, BT817 not found or not supported.\r\n");
474 printf(
"Widget tour running.\r\n");
: Header for main.c file. This file contains the common defines of the application.