|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| bool | cm55_controls_snapshot (ipc_controls_state_t *out) |
| Implement, never call — fills the CONTROLS_STATE snapshot on boards where CM55 owns the controls bus. | |
| lv_obj_t * | game_sprite_create (lv_obj_t *parent, const lv_image_dsc_t *dsc) |
| Implement, never call — materialises an image sprite for the widget manager. | |
| const lv_image_dsc_t * | game_sprite_lookup (int sprite_id) |
| Implement, never call — resolves a project sprite id to a compiled descriptor. | |
| void | game_sprite_set (lv_obj_t *sprite, const lv_image_dsc_t *dsc) |
| Implement, never call — swaps the image on an existing sprite object. | |
| void | ipc_ui_ext_clear_all (void) |
| Implement, never call — resets whatever your extension opcodes left running. | |
| bool | ipc_ui_ext_dispatch (uint32_t cmd, const uint8_t *data) |
| Implement, never call — project extension dispatch for unhandled UI-band opcodes. | |
| uint16_t | ipc_ui_platform_diag (uint32_t *out, uint16_t max_words) |
| Weak hook whose strong definition ships in libbento_cm55.a — the supported ten-word display diagnostics accessor. | |
dist/ipc_core/overridable.txt names exactly seven symbols. The archive defines each of them weak (RED-verified with nm: W symbols in libbento_ipc.a); a project supplies one strong definition and the linker takes it silently. They are things you implement, not things you call — every template "hit" for these names is a definition. A reference page teaching "call this" would be wrong, so every example below is the template's own strong-override definition, cited by file and line. None of those definition files carries snippet markers; the sites are quoted as text.
| bool cm55_controls_snapshot | ( | ipc_controls_state_t * | out | ) |
Implement, never call — fills the CONTROLS_STATE snapshot on boards where CM55 owns the controls bus.
ipc_communication.h (shared include), not in the archive's own headers. Called by the archived IPC service when CM33_NS asks for IPC_CMD_CONTROLS_STATE (0xC6); the weak default reports nothing. The strong override fills out from the CM55-side sensor poll's cached capsense/pot bytes — the single-writer GFX-task fields that the ipc_sensorhub_feed_capsense entry describes — and returns false on a NULL out. Implement it only on boards where CM55 owns the controls bus. template/proj_cm55/modules/cm55_sensor_poll/cm55_sensor_poll.c:349 — bool cm55_controls_snapshot(ipc_controls_state_t *out) opens with the NULL guard and copies the cached s_caps_btn0 / s_caps_btn1 / s_caps_slider / pot values into *out. | lv_obj_t * game_sprite_create | ( | lv_obj_t * | parent, |
| const lv_image_dsc_t * | dsc ) |
Implement, never call — materialises an image sprite for the widget manager.
ui_widget_mgr_create_sprite() to materialise an image sprite under the widget-manager parent; the weak default returns NULL, which the manager reports as -2 ("no sprite engine"). The strong override must create an LVGL image object as a child of parent, set its source to dsc and return it. GFX-task context (the IPC switch). template/proj_cm55/modules/game_sprites_mpy/game_sprite_engine.c:16 — lv_image_create(parent) then lv_image_set_src(img, dsc). | const lv_image_dsc_t * game_sprite_lookup | ( | int | sprite_id | ) |
Implement, never call — resolves a project sprite id to a compiled descriptor.
BENTO_SPR_*) to a compiled descriptor. The archived switch calls it at ipc_ui.c:822 inside case IPC_CMD_UI_SPRITE_FRAME: and hands the result to ui_widget_mgr_set_sprite_image(). Must return NULL for an out-of-range id; the template override bounds-checks against BENTO_SPR_COUNT and carries a _Static_assert that the registry size matches it. The template declares the prototype locally (game_sprite_registry.c:17) because no shipped header does. template/proj_cm55/modules/game_sprites_mpy/game_sprite_registry.c:52. | void game_sprite_set | ( | lv_obj_t * | sprite, |
| const lv_image_dsc_t * | dsc ) |
Implement, never call — swaps the image on an existing sprite object.
ui_widget_mgr_set_sprite_image(). Must be a no-op on a NULL sprite or descriptor. GFX-task context. template/proj_cm55/modules/game_sprites_mpy/game_sprite_engine.c:25 — NULL guard then lv_image_set_src(sprite, dsc). | void ipc_ui_ext_clear_all | ( | void | ) |
Implement, never call — resets whatever your extension opcodes left running.
IPC_CMD_UI_CLEAR_ALL handling when a new MicroPython script starts. Not declared in any shipped header (bento_secure_undeclared.h: "WEAK. Define
your own; yours wins at link time"). Implement it to reset whatever your extension opcodes left running — the template uses it to stop the DFR0522 marquee and blank the matrix so the previous student's output does not keep running under the next program. GFX-task context; void. template/proj_cm55/modules/dfr0522_rgb/dfr0522_ipc.c:37 — void ipc_ui_ext_clear_all(void) { (void)dfr0522_clear(); }. | bool ipc_ui_ext_dispatch | ( | uint32_t | cmd, |
| const uint8_t * | data ) |
Implement, never call — project extension dispatch for unhandled UI-band opcodes.
Project extension dispatch hook for UI-band IPC opcodes not handled by the built-in switch (weak default returns false / no-op). Called from process_ui_command() in GFX-task context, so implementations may touch the display / GFX resources (e.g. the QWA309 DFR0522 RGB matrix on display I2C).
| cmd | The IPC opcode (IPC_CMD_UI_* range). |
| data | Pointer to the raw 128-byte IPC payload (ipc_msg_t.data). |
ipc_ui.h). data points at the raw 128-byte IPC payload. Return true when the opcode was handled. A project may override it once; when several features ride the hook, chain them from a single strong definition, as the template does. template/proj_cm55/modules/ipc_ui_ext/ipc_ui_ext_chain.c:41 — tries dfr0522_ext_dispatch(cmd, data) first, then the audio SFX handler, returning true at the first taker. | uint16_t ipc_ui_platform_diag | ( | uint32_t * | out, |
| uint16_t | max_words ) |
Weak hook whose strong definition ships in libbento_cm55.a — the supported ten-word display diagnostics accessor.
max_words >= 10 (returns 0 otherwise) and returns 10 words: DC IRQ status, DC frame / underflow / bus-error counts, GPU recovery count, flush start / ready / timeout counters, GFX task stack high-water mark, and idle percent. This is the supported external access path for the display controller's g_tesaiot_display_diag — document and use the accessor, not the struct. Surfaced to MicroPython as ui._diag() (mtb-mpy only; mtb-only C code calls it directly). The archive holds only the weak stub; the strong definition ships inside libbento_cm55.a, so a project that uses the shipped display controller already has it. TESAIoT_KIT_PSE84_AI-Micropython-BentoClaw/proj_cm55/modules/lvgl_display/controller/tesaiot_display.c:593-609 (compiled into libbento_cm55.a; not shipped as source): the max_words guard, nine g_tesaiot_display_diag fields into out[0..8], the idle percent into out[9], return 10.