功能:添加 Wi-Fi 连接管理组件
在 wifi-connect.c 中实现了新的 Wi-Fi 连接管理模块,负责配网、连接及状态上报。 添加了用于 Wi-Fi 配置和状态显示的 HTML 界面。 集成了 NVS 用于存储 Wi-Fi 凭证。 更新了 CMakeLists.txt 以包含新模块的依赖项。 修改了 main.c 以初始化 Wi-Fi 连接管理并等待连接成功。
This commit is contained in:
20
components/sntp_time/include/sntp_time.h
Normal file
20
components/sntp_time/include/sntp_time.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user