SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (MTB & µPython)
Loading...
Searching...
No Matches
tesaiot_display.h
Go to the documentation of this file.
1/*******************************************************************************
2 * File Name : tesaiot_display.h
3 *
4 * Description : TESAIoT display controller: GFXSS, vg_lite, LVGL init,
5 * display/indev ports, and graphics task (CM55).
6 *
7 * Author : Asst.Prof.Santi Nuratch, Ph.D
8 * Thailand Embedded Systems Association (TESA)
9 * Modifications : (c) 2026 TESAIoT
10 *
11 *******************************************************************************/
12
13#ifndef TESAIOT_DISPLAY_H
14#define TESAIOT_DISPLAY_H
15
16#include <stdio.h>
17
18#include "FreeRTOS.h"
19#include "task.h"
20
21#include "display_i2c_config.h"
22#include "lv_port_disp.h"
23#include "lvgl.h"
24#include "mtb_disp_dsi_waveshare_4p3.h"
25#include "vg_lite.h"
26#include "vg_lite_platform.h"
27
28#define GPU_INT_PRIORITY (3U)
29#define DC_INT_PRIORITY (3U)
30#define I2C_CONTROLLER_IRQ_PRIORITY (2UL)
31
32#define APP_BUFFER_COUNT (2U)
33#define DEFAULT_GPU_CMD_BUFFER_SIZE ((64U) * (1024U))
34#define GPU_TESSELLATION_BUFFER_SIZE ((MY_DISP_VER_RES) * 128U)
35#define VGLITE_HEAP_SIZE \
36 (((DEFAULT_GPU_CMD_BUFFER_SIZE) * (APP_BUFFER_COUNT)) + \
37 ((GPU_TESSELLATION_BUFFER_SIZE) * (APP_BUFFER_COUNT)))
38
39#define GPU_MEM_BASE (0x0U)
40#define VG_PARAMS_POS (0UL)
41
42#define GFX_TASK_NAME ("TESAIoT Gfx Task")
43#define GFX_TASK_STACK_SIZE (configMINIMAL_STACK_SIZE * 32)
44#define GFX_TASK_PRIORITY (configMAX_PRIORITIES - 1)
45
57
58extern TaskHandle_t rtos_cm55_gfx_task_handle;
60
61BaseType_t tesaiot_display_init(void);
62void tesaiot_display_task(void *arg);
63
64static inline void tesaiot_display_tick(void) { lv_tick_inc(1); }
65
66#endif /* TESAIOT_DISPLAY_H */
TaskHandle_t rtos_cm55_gfx_task_handle
handle ของ GFX task ซึ่ง tesaiot_display_init() เป็นเจ้าของ — ห้ามแตะต้องจากภายนอก
volatile tesaiot_display_diag_t g_tesaiot_display_diag
struct ข้อมูลวินิจฉัยของจอแสดงผล — ให้ใช้ accessor ipc_ui_platform_diag() ไม่ใช่ตัว struct
void tesaiot_display_task(void *arg)
ตัวเนื้อของ GFX task — ห้ามสร้างเอง ห้ามเรียกเอง
BaseType_t tesaiot_display_init(void)
จุดเข้าใช้งานสาธารณะจุดเดียว — สร้าง GFX task ก่อน scheduler เริ่มทำงาน; เทียบค่าที่คืนกลับมากับ pdPA...
Definition tesaiot_display.h:46
uint32_t gpu_recovery_count
Definition tesaiot_display.h:51
uint32_t dc_bus_error_count
Definition tesaiot_display.h:50
uint32_t dc_underflow_count
Definition tesaiot_display.h:49
uint32_t last_dc_irq_status
Definition tesaiot_display.h:47
uint32_t flush_timeout_count
Definition tesaiot_display.h:54
uint32_t dc_disp0_count
Definition tesaiot_display.h:48
uint32_t flush_start_count
Definition tesaiot_display.h:52
uint32_t gfx_task_stack_min_words
Definition tesaiot_display.h:55
uint32_t flush_ready_count
Definition tesaiot_display.h:53