|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| void | hsm_enrol_open (void) |
| Opens the CSR-enrolment overlay from an LVGL click; pair with hsm_provision_ui_teardown(). | |
| void | hsm_protect_open (void) |
| Opens the Protected Update overlay; same pairing contract as hsm_enrol_open(). | |
| void | hsm_provision_ui_teardown (void) |
| Last statement of the page's destroy_cb, while LVGL objects are still valid. | |
Header: hsm_provision_ui.h. Implementation: archived hsm_provision_ui.c (libbento_cm55.a). Two teaching screens on the HSM page — certificate enrolment by CSR, and Protected Update — each a full-screen overlay whose work is asynchronous: IPC_CMD_HSM_PROVISION returns immediately and an lv_timer polls, because a busy-wait would freeze the screen and stop the busy modal from explaining the freeze.
| void hsm_enrol_open | ( | void | ) |
Opens the CSR-enrolment overlay from an LVGL click; pair with hsm_provision_ui_teardown().
Open the Enrol screen — key pair, CSR, proof of possession, certificate.
lv_event_cb body — invoked from an LVGL button click, GFX-task context only. No arguments, no return, no error path at the call site: the overlay reports its own status. No init precedes it beyond the HSM page existing; it self-constructs the overlay. The owning page must pair it with hsm_provision_ui_teardown() in its destroy path — that pairing is the contract. | void hsm_protect_open | ( | void | ) |
Opens the Protected Update overlay; same pairing contract as hsm_enrol_open().
Open the Protect screen — pending change set, confirm, run, read back.
hsm_enrol_open: event-callback body, GFX-task only, overlay reports its own status, must be paired with hsm_provision_ui_teardown() in the page's destroy. | void hsm_provision_ui_teardown | ( | void | ) |
Last statement of the page's destroy_cb, while LVGL objects are still valid.
Called from page_hsm_destroy(): drop any overlay and cancel its poll timer.
destroy_cb (GFX-task context) while the LVGL objects are still valid, as the last statement — after the page's own timers are deleted and its widget pointers nulled: local cleanup first, then the overlay teardown. Idempotent when no overlay is open (the shipped caller does not guard it). Rationale in-code: a provisioning poll timer that fires after the widgets are freed dereferences them. The module's own close button (hsm_provision_ui.c:447) is the other caller.