|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Topics | |
| The hand-written-extern lesson | |
Functions | |
| uint32_t | calculate_idle_percentage (void) |
| GFX idle-percent source — bind it to LV_SYSMON_GET_IDLE. | |
Variables | |
| TaskHandle_t | rtos_cm55_gfx_task_handle |
| GFX task handle, owned by tesaiot_display_init() — never touch it from outside. | |
| volatile tesaiot_display_diag_t | g_tesaiot_display_diag |
| Display diagnostics struct — use the ipc_ui_platform_diag() accessor, not the struct. | |
| cy_stc_scb_i2c_context_t | disp_touch_i2c_controller_context |
| Shared display/touch I2C context — consumer writes the extern; bounded timeouts only. | |
The archive's diagnostics surface and the exported symbols whose only declarations are the consumer's own — the display diagnostics struct and its accessor discipline, the GFX task handle, the shared display/touch I2C context, and the GFX idle-percent source. The generated bento_secure_undeclared.h and the hand-written-extern pattern that goes with it are covered in The hand-written-extern lesson.
| uint32_t calculate_idle_percentage | ( | void | ) |
GFX idle-percent source — bind it to LV_SYSMON_GET_IDLE.
page_edge_ai.c:1461). The template's only use — and the exemplar to ship — is the LVGL configuration binding: LV_USE_SYSMON 1, the extern guarded by __ASSEMBLER__, and LV_SYSMON_GET_IDLE defined to this function, so LVGL's own system monitor reads the same number ipc_ui_platform_diag() reports as word 9.
|
extern |
GFX task handle, owned by tesaiot_display_init() — never touch it from outside.
tesaiot_display_init(); its two references are internal (tesaiot_display.c:190 xTaskNotifyFromISR from the DC ISR, :212 the xTaskCreate out-parameter). Anti-example: never use it directly — never notify, suspend or delete the GFX task from outside. Declared in tesaiot_display.h despite the generated undeclared-list entry; do not add a conflicting hand-written extern.
|
extern |
Display diagnostics struct — use the ipc_ui_platform_diag() accessor, not the struct.
tesaiot_display.c. The intended external access is the accessor ipc_ui_platform_diag(uint32_t *out, uint16_t max_words) (tesaiot_display.c:593; needs max_words >= 10, returns 10) — document the accessor, not the struct. On mtb-mpy the same ten words are ui._diag(); on mtb-only call the accessor from C. Declared in tesaiot_display.h despite the generated undeclared-list entry.
|
extern |
Shared display/touch I2C context — consumer writes the extern; bounded timeouts only.
extern. The SCB is initialised by the display bring-up (tesaiot_display.c:203); consumers must not call Cy_SCB_I2C_Init on it. Always paired with DISPLAY_I2C_CONTROLLER_HW as the base, never another SCB. The bus is shared, so every PDL call uses a bounded timeout (2 ms), never 0 / block-forever: these transactions run in the GFX task at MAX-1 priority, and a wedged clock-stretching device once parked the GFX task on the bus and starved every lower-priority CM55 task. Re-initialising touch after another master (OPTIGA) releases the bus must be deferred into the GFX task via the touch_needs_reinit flag drained in the LVGL read callback.