SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (MTB & µPython)
Loading...
Searching...
No Matches
wifi_saved.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define WIFI_SAVED_MAX   6

Functions

struct __attribute__ ((packed))
bool wifi_saved_load (int index, wifi_saved_entry_t *out)
 Load a saved network from OPTIGA slot.
bool wifi_saved_store (int index, const wifi_saved_entry_t *entry)
 Store a network entry to OPTIGA slot.
bool wifi_saved_erase (int index)
 Erase a saved network from OPTIGA slot.
int wifi_saved_find (const char *ssid)
 Find a saved network by SSID.
bool wifi_saved_add (const char *ssid, const char *password, uint8_t security)
 Add or update a network in saved list. If SSID already exists, updates in-place. If not, uses the first empty slot (or overwrites slot 0 if full).
int wifi_saved_count (void)
 Count number of valid saved networks.
int wifi_saved_load_all (wifi_saved_entry_t *entries)
 Load all saved networks into an array.
bool wifi_saved_probe_start (void)
 ส่ง probe ตรวจการมีอยู่ของ OPTIGA; ต้องเรียงลำดับ start → ready → finish อย่างเคร่งครัด
bool wifi_saved_probe_ready (void)
 อาจเป็น true ทันทีหลัง probe_start() — ต้องรองรับเส้นทางลัดที่มาจากผลที่แคชไว้
void wifi_saved_probe_finish (void)
 เรียกเพียงครั้งเดียวต่อหนึ่ง probe และเฉพาะหลัง probe_ready() เท่านั้น; เป็นตัวตั้งสถานะ OPTIGA / RAM-fallback
bool wifi_saved_read_start (int index)
 มีการอ่าน slot ค้างอยู่ได้ครั้งละหนึ่งรายการเท่านั้น; การคืนค่า false หมายถึงข้าม slot นั้นไป
bool wifi_saved_read_ready (void)
 ยังไม่พร้อมหมายถึงให้ลองใหม่ใน tick ถัดไป
bool wifi_saved_read_result (wifi_saved_entry_t *out)
 เติมข้อมูลลงในรายการที่ผู้เรียกเป็นเจ้าของ; false หมายถึงไม่มีข้อมูลใน slot นั้น

Variables

 wifi_saved_entry_t

Macro Definition Documentation

◆ WIFI_SAVED_MAX

#define WIFI_SAVED_MAX   6

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed) )

Variable Documentation

◆ wifi_saved_entry_t

wifi_saved_entry_t