feat: 更新 WiFi 管理与配置
- 在 sdkconfig.defaults 中禁用 WiFi 支持 - 更新 app_main.c 以根据配置条件编译 WiFi 管理器 - 修改 CMakeLists.txt,移除 WiFi 相关依赖 - 在 wifi_manager.c 中添加条件编译以处理 WiFi 禁用情况 - 更新 board_config.h,定义 WiFi 启用标志
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#include "wifi_manager.h"
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
#if BOARD_WIFI_ENABLED
|
||||
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_netif.h"
|
||||
@@ -114,3 +118,14 @@ void wifi_manager_init(void)
|
||||
|
||||
ESP_LOGI(TAG, "WiFi STA started, connecting in background...");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "esp_log.h"
|
||||
|
||||
void wifi_manager_init(void)
|
||||
{
|
||||
ESP_LOGI("wifi_manager", "WiFi disabled by board config");
|
||||
}
|
||||
|
||||
#endif /* BOARD_WIFI_ENABLED */
|
||||
|
||||
Reference in New Issue
Block a user