|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| bool | ipc_ui_init (lv_obj_t *parent) |
| UI handler bring-up — last in the prologue, gated on display_ok. | |
| void | ipc_ui_set_container (lv_obj_t *parent) |
| One-line forward to ui_widget_mgr_set_parent(); NULL on destroy is mandatory. | |
| void | ipc_ui_input_activity (void) |
| Arms the 5 ms fast drain for one FAST_TIMEOUT window. | |
Header: ipc_ui.h. Implementation: archived ipc_ui.c (libbento_ipc.a). UI handler bring-up, container binding and the input hook. "ISR callback ->
FreeRTOS queue -> LVGL timer (50ms) processes commands in GFX task context" (ipc_ui.h): the ISR half only enqueues; every LVGL operation happens on the timer, in the GFX task. The three weak hooks declared or referenced here (ipc_ui_ext_dispatch, ipc_ui_ext_clear_all, ipc_ui_platform_diag) are documented with the other hooks on Weak hooks (implement, don't call).
| bool ipc_ui_init | ( | lv_obj_t * | parent | ) |
UI handler bring-up — last in the prologue, gated on display_ok.
Initialize the IPC UI handler. Registers IPC callback, creates FreeRTOS queue, and LVGL timer. Must be called after LVGL and IPC Pipe are initialized.
| parent | LVGL parent object for user-created widgets (UX/UI tab container). |
cm55_ipc_communication_setup() first — it owns Cy_IPC_Pipe_Init(); (2) ipc_sensorhub_init() then ipc_service_init() before GFXSS bring-up so IPC survives a display failure; (3) ipc_ui_init() last and gated on display_ok — it calls lv_timer_create() (ipc_ui.c:911) — while ipc_lcd_init() is not gated: the ipc_only: label is the whole point; (4) both take NULL (deferred binding); (5) both bool returns are explicitly (void) -cast — failure must not abort boot. Inside, on Cy_IPC_Pipe_RegisterCallback failure it deletes its queue and returns false (ipc_ui.c:885-913). It calls ui_widget_mgr_init() itself as its first statement — never call that yourself. Never call cm55_ipc_communication_setup() twice (wifi_manager.c:65). Note: the evidence found no in-code assertion of a "no printf in the CM55 IPC ISR" rule at these sites — none is cited here. | void ipc_ui_set_container | ( | lv_obj_t * | parent | ) |
One-line forward to ui_widget_mgr_set_parent(); NULL on destroy is mandatory.
Update the widget parent container (for page-based navigation). Called when Playground page is created/destroyed. Pass NULL to invalidate (page destroyed), non-NULL to activate.
| parent | LVGL container or NULL. |
ui_widget_mgr_set_parent() (ipc_ui.c:918-921). Same NULL-on-destroy obligation as ipc_lcd_set_container(): the page binds its content container on create and must pass NULL on destroy, or the IPC handler writes into LVGL objects freed by lv_screen_load_anim(auto_del). Bind order ui-then-lcd on create and identically on destroy. Void; GFX-task context. Note that ui_widget_mgr_set_parent() clears all existing widgets when the parent changes — a page switch drops the MicroPython script's widgets by design. | void ipc_ui_input_activity | ( | void | ) |
Arms the 5 ms fast drain for one FAST_TIMEOUT window.
FAST_TIMEOUT window so the first tap of a quiescent app is answered at fast-mode latency instead of waiting out the 200 ms idle tick. Its single caller is the archived widget manager's input event callback (ui_widget_mgr.c:2667), whose comment is the contract: "Runs in GFX task context (LVGL event callback) — same context the drain
timer callback uses, so no locking is needed." Deliberately not wired to POLL_EVENTS: polling is continuous, so arming there would pin fast mode on permanently and revert the GFX sleep-clamp tuning that protects ai_infer / radar (ipc_ui.h). Definition at ipc_ui.c:158-160. A consumer's own LVGL input callback may call it for the same reason; nothing else should. BENTO-TESAIoT-libraries/claw/common/modules/ipc_ui/ui_widget_mgr.c:2667 (compiled into the prebuilt archive; not shipped as source): the widget input event callback calls ipc_ui_input_activity() once per real user input, after the per-widget event-mask gate. The site is pinned, not replicated.