|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| BaseType_t | tesaiot_display_init (void) |
| Sole public entry — creates the GFX task before the scheduler starts; compare against pdPASS. | |
| void | tesaiot_display_task (void *arg) |
| The GFX task body — never create it, never call it. | |
Variables | |
| volatile uint8_t | tesaiot_display_ready |
| Tri-state bring-up flag: 0 pending, 1 display + IPC, 2 IPC-only headless. | |
Header: tesaiot_display.h. Implementation: archived tesaiot_display.c (libbento_cm55.a). Owns GFXSS, vg_lite and LVGL bring-up, the display and touch I2C bus, the GFX task, and — because it runs the IPC prologue before the display — the whole CM55 boot ordering (see the ipc_core reference).
0 = pending, 1 = display + IPC up, 2 = IPC-only headless (the panel failed but the IPC path came up). Both shipped callers test == 0, so a headless board proceeds. Testing for == 1 would hang a consumer on a board with a dark panel — which after a debugger reset every board is.
| BaseType_t tesaiot_display_init | ( | void | ) |
Sole public entry — creates the GFX task before the scheduler starts; compare against pdPASS.
cybsp_init() then __enable_irq() then this — the GFXSS DC/GPU ISRs are wired during task startup, so interrupts must be on first. Called from main() before vTaskStartScheduler(): it creates the GFX task, it does not run it. Compare the return against pdPASS, not CY_RSLT_SUCCESS. The template hard-fails into distinct LED loops (LED1 = cybsp_init failed, LED2 = this failed) so the two are visually distinct. It is the sole public entry: it creates the GFX task with xTaskCreate(tesaiot_display_task, ...) and stores the handle in rtos_cm55_gfx_task_handle (tesaiot_display.c:210-213). The task brings up IPC before the display so IPC survives a display failure — which is why tesaiot_display_ready has the value 2. | void tesaiot_display_task | ( | void * | arg | ) |
The GFX task body — never create it, never call it.
xTaskCreate argument inside tesaiot_display_init() (tesaiot_display.c:211). Anti-example: never create it yourself, never call it — a second GFX task means two LVGL owners, two IPC prologues and a double cm55_ipc_communication_setup(). Consumers call tesaiot_display_init() and nothing else.
|
extern |
Tri-state bring-up flag: 0 pending, 1 display + IPC, 2 IPC-only headless.
bento_secure_undeclared.h); the consumer writes its own extern volatile uint8_t, and volatile is mandatory — the GFX task writes it. Poll only from a FreeRTOS task after the scheduler starts, with vTaskDelay — never a busy spin, never from main(). The wait is always bounded (150 x 100 ms, or 10 000 ms) and falls through on timeout rather than hanging. Tri-state: 0 = pending, 1 = display + IPC, 2 = IPC-only headless; both shipped callers test == 0 so headless boots proceed. Purpose per the radar caller: avoid startup bus contention with GFX / IPC bring-up.