在 wifi-connect.c 中实现了新的 Wi-Fi 连接管理模块,负责配网、连接及状态上报。 添加了用于 Wi-Fi 配置和状态显示的 HTML 界面。 集成了 NVS 用于存储 Wi-Fi 凭证。 更新了 CMakeLists.txt 以包含新模块的依赖项。 修改了 main.c 以初始化 Wi-Fi 连接管理并等待连接成功。
21 lines
358 B
C
21 lines
358 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief 初始化 SNTP 并等待首次对时完成
|
|
*
|
|
* @param timeout_ms 等待首次同步的超时时间(毫秒)
|
|
* @return esp_err_t ESP_OK 表示已完成同步
|
|
*/
|
|
esp_err_t sntp_timp_sync_time(uint32_t timeout_ms);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|