SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (ModusToolbox)
Loading...
Searching...
No Matches
storage_creds_decls.h
Go to the documentation of this file.
1/* Declaration surface for the storage_creds docs-only reference set.
2 *
3 * storage_creds has no dist include directory, and a \fn block is fatal
4 * under WARN_AS_ERROR unless a declaration exists for it to attach to. The
5 * six prototypes below are copied verbatim from
6 * dist/mpy_secure/include/lfs_wifi_creds.h, the header both variants ship,
7 * AND so are their doc comments — the mtb-only run reads this file instead
8 * of that header, so without the comments here the mtb-only site's
9 * lfs_wifi_creds reference page loses every brief/detailed description
10 * (RED2 F-4). Keep both in lockstep with the real header. The additional
11 * contract documentation lives in lfs_wifi_creds.dox. This file is read
12 * only by doxygen, and only by the mtb-only run — the mtb-mpy run EXCLUDEs
13 * it because dist/mpy_secure/include/lfs_wifi_creds.h is already in its
14 * INPUT and the six functions must not be declared twice (bento-release.sh
15 * cmd_docs_html dedupe). Never compiled, never shipped as an include.
16 */
17#pragma once
18
24
30
35
46int lfs_wifi_creds_read(qspi_wifi_entry_t *entries, int max_entries);
47
57bool lfs_wifi_creds_write(const qspi_wifi_entry_t *entries, int count);
58
bool lfs_wifi_creds_write(const qspi_wifi_entry_t *entries, int count)
เขียนทับ /.wifi_creds ด้วย CRC32; ทำ snapshot ภายใต้ lock แล้วเขียนนอก lock
int lfs_wifi_creds_read(qspi_wifi_entry_t *entries, int max_entries)
เติมอาร์เรย์ของผู้เรียก; คืนค่าจำนวนรายการ และคืน 0 เมื่อการตรวจความถูกต้องล้มเหลวไม่ว่ากรณีใด
void lfs_wifi_creds_init(void)
บน variant นี้เป็น no-op — bento_storage_init() เป็นเจ้าของการเริ่มต้นใช้งาน
bool lfs_wifi_creds_ready(void)
ส่งต่อไปยัง bento_storage_ready(); ตรวจก่อนการอ่านและการเขียนทุกครั้ง
void lfs_wifi_creds_deinit(void)
บน variant นี้เป็น no-op; ลำดับการ teardown ของ mtb-mpy ไม่นำมาใช้ที่นี่
bool lfs_wifi_creds_needs_resave(void)
บน variant นี้เป็น false เสมอ — ที่เก็บฝั่ง C เขียนเฉพาะรูปแบบปัจจุบันเท่านั้น