2019-11-14 04:03:14 +00:00
|
|
|
set(srcs)
|
2019-08-13 05:11:46 +00:00
|
|
|
set(include)
|
2019-04-10 08:24:50 +00:00
|
|
|
|
2019-11-14 04:03:14 +00:00
|
|
|
# If Ethernet disabled in Kconfig, this is a config-only component
|
2019-08-13 05:11:46 +00:00
|
|
|
if(CONFIG_ETH_ENABLED)
|
|
|
|
set(srcs "src/esp_eth.c")
|
|
|
|
set(include "include")
|
|
|
|
|
|
|
|
if(CONFIG_ETH_USE_ESP32_EMAC)
|
|
|
|
list(APPEND srcs "src/esp_eth_mac_esp32.c"
|
2019-11-14 04:03:14 +00:00
|
|
|
"src/esp_eth_phy_dp83848.c"
|
|
|
|
"src/esp_eth_phy_ip101.c"
|
|
|
|
"src/esp_eth_phy_lan8720.c"
|
|
|
|
"src/esp_eth_phy_rtl8201.c")
|
2019-08-13 05:11:46 +00:00
|
|
|
endif()
|
2019-04-10 08:24:50 +00:00
|
|
|
|
2019-08-13 05:11:46 +00:00
|
|
|
if(CONFIG_ETH_SPI_ETHERNET_DM9051)
|
|
|
|
list(APPEND srcs "src/esp_eth_mac_dm9051.c"
|
2019-11-14 04:03:14 +00:00
|
|
|
"src/esp_eth_phy_dm9051.c")
|
2019-08-13 05:11:46 +00:00
|
|
|
endif()
|
2019-06-25 11:36:56 +00:00
|
|
|
|
2019-11-14 04:03:14 +00:00
|
|
|
if(CONFIG_ETH_USE_OPENETH)
|
|
|
|
list(APPEND srcs "src/esp_eth_mac_openeth.c")
|
|
|
|
endif()
|
2019-10-01 16:50:34 +00:00
|
|
|
endif()
|
|
|
|
|
2019-08-13 05:11:46 +00:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2019-11-14 04:03:14 +00:00
|
|
|
INCLUDE_DIRS ${include}
|
|
|
|
REQUIRES "esp_event"
|
|
|
|
PRIV_REQUIRES "esp_netif" "driver" "log")
|