1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
35
36
37
38
39
40
41
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* ... */
volatile bool overrideBlitcaps = false;
#include <touchgfx/hal/HAL.hpp>
#include <touchgfx/hal/BoardConfiguration.hpp>
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
using namespace touchgfx;
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
/* ... */
#define configGUI_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
#define configGUI_TASK_STK_SIZE ( 1500 )
#define CANVAS_BUFFER_SIZE (8 * 1024)
static void GUITask(void* params)
{
touchgfx::HAL::getInstance()->taskEntry();
}{ ... }
static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
int main (void)
{
hw_init();
touchgfx_init();
CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
xTaskCreate( GUITask, "GUITask",
configGUI_TASK_STK_SIZE,
NULL,
configGUI_TASK_PRIORITY,
NULL);
vTaskStartScheduler();
for(;;);
}{ ... }