mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
feat(wifi): avoid compiling components related to wifi when wifi is not supported
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
idf_component_register(SRCS "cmd_wifi.c"
|
||||
if(CONFIG_ESP_WIFI_ENABLED OR CONFIG_ESP_HOST_WIFI_ENABLED)
|
||||
set(srcs "cmd_wifi.c")
|
||||
else()
|
||||
set(srcs)
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS .
|
||||
REQUIRES console esp_wifi)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -24,11 +24,6 @@
|
||||
#include "esp_event.h"
|
||||
#include "cmd_wifi.h"
|
||||
|
||||
/**
|
||||
* This component will be supported using esp_wifi_remote
|
||||
*/
|
||||
#if CONFIG_SOC_WIFI_SUPPORTED
|
||||
|
||||
#define JOIN_TIMEOUT_MS (10000)
|
||||
|
||||
static EventGroupHandle_t wifi_event_group;
|
||||
@@ -139,5 +134,3 @@ void register_wifi(void)
|
||||
|
||||
ESP_ERROR_CHECK( esp_console_cmd_register(&join_cmd) );
|
||||
}
|
||||
|
||||
#endif // CONFIG_SOC_WIFI_SUPPORTED
|
||||
|
Reference in New Issue
Block a user