forked from espressif/esp-idf
feat(esp_wifi): Add dependency on wifi_remote for chips with no wifi
This commit is contained in:
@@ -38,11 +38,18 @@ if(CONFIG_ESP_WIFI_ENABLED)
|
|||||||
if(CONFIG_ESP_WIFI_NAN_ENABLE)
|
if(CONFIG_ESP_WIFI_NAN_ENABLE)
|
||||||
list(APPEND srcs "wifi_apps/src/nan_app.c")
|
list(APPEND srcs "wifi_apps/src/nan_app.c")
|
||||||
endif()
|
endif()
|
||||||
|
set(local_include_dirs include/local)
|
||||||
|
else()
|
||||||
|
# No local wifi: provide only netif bindings
|
||||||
|
set(srcs
|
||||||
|
"src/wifi_default.c"
|
||||||
|
"src/wifi_netif.c")
|
||||||
|
set(local_include_dirs)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "include" "wifi_apps/include"
|
INCLUDE_DIRS "include" "wifi_apps/include" ${local_include_dirs}
|
||||||
REQUIRES esp_event esp_phy esp_netif
|
REQUIRES esp_event esp_phy esp_netif
|
||||||
PRIV_REQUIRES driver esptool_py esp_pm esp_timer nvs_flash
|
PRIV_REQUIRES driver esptool_py esp_pm esp_timer nvs_flash
|
||||||
wpa_supplicant hal lwip esp_coex ${extra_priv_requires}
|
wpa_supplicant hal lwip esp_coex ${extra_priv_requires}
|
||||||
@@ -70,6 +77,13 @@ if(CONFIG_ESP_WIFI_ENABLED)
|
|||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
# No local wifi: use esp_wifi_remote if it's available within our components
|
||||||
|
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||||
|
if(esp_wifi_remote IN_LIST build_components)
|
||||||
|
idf_component_get_property(esp_wifi_remote esp_wifi_remote COMPONENT_LIB)
|
||||||
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${esp_wifi_remote})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SPIRAM)
|
if(CONFIG_SPIRAM)
|
||||||
idf_component_optional_requires(PRIVATE esp_psram)
|
idf_component_optional_requires(PRIVATE esp_psram)
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
#include "esp_system.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_netif.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
Reference in New Issue
Block a user