Skip to content

Commit 0a1d6be

Browse files
committed
Fix ethernet build issue
1 parent 5f3e523 commit 0a1d6be

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

solutions/common/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11

22
set(component_srcdirs "./")
33

4+
set(component_requires esp_netif nvs_flash esp_wifi)
5+
6+
if("${IDF_TARGET}" STREQUAL "esp32p4")
7+
list(APPEND component_requires "ethernet_init esp_eth")
8+
endif()
9+
410
idf_component_register(
511
SRC_DIRS ./
612
INCLUDE_DIRS ./
7-
REQUIRES esp_netif nvs_flash esp_wifi
13+
REQUIRES ${component_requires}
814
)

solutions/common/network.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "esp_event.h"
1818
#include "network.h"
1919

20-
#ifdef USE_ETHERNET
20+
#ifdef CONFIG_NETWORK_USE_ETHERNET
2121
#include "esp_eth.h"
2222
#include "ethernet_init.h"
2323
#else

0 commit comments

Comments
 (0)