|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| void | fw_hash_compute_at_boot (void) |
| Compute and cache the SHA-256 identity digest (about 80 ms once); idempotent. | |
| const char * | fw_hash_hex (void) |
| The cached 64-char digest; always non-NULL — "unknown" before compute. Never free it. | |
| void | fw_hash_prefix8 (char *out9) |
| First 8 hex chars + NUL into out9 (at least 9 bytes). No caller anywhere. | |
| void | fw_hash_get_diagnostics (fw_hash_diag_t *out) |
| Fill a caller-owned hash-diagnostics snapshot for the _diag block of bento.fw.query. | |
| void | bento_fw_handle_query (const char *json, const jsmntok_t *toks, int n_toks) |
| Handler for bento.fw.query: cheap read-only metadata probe. Dispatcher-only. | |
| void | bento_fw_handle_update_begin (const char *json, const jsmntok_t *toks, int n_toks) |
| Handler for bento.fw.update.begin: launches the LCD Y/N prompt; ack deferred to the decision. | |
| void | bento_fw_emit_boot_complete (void) |
| Emit bento.fw.update.complete once per boot on the first CONNECTED transition. | |
| void | bento_fw_on_user_decision (int approve) |
| Deliver the CM55 LCD Y/N decision for the current prompt; no-op when none is pending. | |
Eight functions: the firmware hash (fw_hash_*) and the update flow (bento_fw_*). Compiled only with ENABLE_PAGE_BENTO_BUDDY=1 (default 0, proj_cm33_ns/Makefile:64, :305); rebuild after make getlibs — Flag gate (read first).
Declarations: fw_hash.h, bento_fw.h (which forward-declares jsmntok_t itself and does not need vendor/jsmn.h). Implementation fw_hash.c / bento_fw.c is archived in libbento_secure.a. Every desktop-triggered flash passes an on-device LCD Y/N prompt showing the first 8 hex chars of the target SHA-256 — no bypass, no timeout-default-to-yes.
| void fw_hash_compute_at_boot | ( | void | ) |
Compute and cache the SHA-256 identity digest (about 80 ms once); idempotent.
| const char * fw_hash_hex | ( | void | ) |
The cached 64-char digest; always non-NULL — "unknown" before compute. Never free it.
| void fw_hash_prefix8 | ( | char * | out9 | ) |
First 8 hex chars + NUL into out9 (at least 9 bytes). No caller anywhere.
| void fw_hash_get_diagnostics | ( | fw_hash_diag_t * | out | ) |
Fill a caller-owned hash-diagnostics snapshot for the _diag block of bento.fw.query.
| void bento_fw_handle_query | ( | const char * | json, |
| const jsmntok_t * | toks, | ||
| int | n_toks ) |
Handler for bento.fw.query: cheap read-only metadata probe. Dispatcher-only.
| void bento_fw_handle_update_begin | ( | const char * | json, |
| const jsmntok_t * | toks, | ||
| int | n_toks ) |
Handler for bento.fw.update.begin: launches the LCD Y/N prompt; ack deferred to the decision.
| void bento_fw_emit_boot_complete | ( | void | ) |
Emit bento.fw.update.complete once per boot on the first CONNECTED transition.
| void bento_fw_on_user_decision | ( | int | approve | ) |
Deliver the CM55 LCD Y/N decision for the current prompt; no-op when none is pending.