Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ dependencies:
chmorgan/esp-libhelix-mp3:
version: "1.0.3"
require: public
espressif/lan867x:
version: "^2.0.0"
rules:
- if: "target in [esp32, esp32p4]"
examples:
- path: ./idf_component_examples/hello_world
- path: ./idf_component_examples/hw_cdc_hello_world
Expand Down
6 changes: 6 additions & 0 deletions libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#if defined __has_include && __has_include("soc/emac_ext_struct.h")
#include "soc/emac_ext_struct.h"
#endif /* __has_include("soc/emac_ext_struct.h" */
#if ETH_PHY_LAN867X_SUPPORTED
#include "esp_eth_phy_lan867x.h"
#endif
#include "soc/rtc.h"
#endif /* CONFIG_ETH_USE_ESP32_EMAC */
#include "esp32-hal-periman.h"
Expand Down Expand Up @@ -292,6 +295,9 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
case ETH_PHY_DP83848: _phy = esp_eth_phy_new_dp83848(&phy_config); break;
case ETH_PHY_KSZ8041: _phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
case ETH_PHY_KSZ8081: _phy = esp_eth_phy_new_ksz80xx(&phy_config); break;
#if ETH_PHY_LAN867X_SUPPORTED
case ETH_PHY_LAN867X: _phy = esp_eth_phy_new_lan867x(&phy_config); break;
#endif
default: log_e("Unsupported PHY %d", type); break;
}
if (_phy == NULL) {
Expand Down
6 changes: 6 additions & 0 deletions libraries/Ethernet/src/ETH.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
#include "esp_netif.h"

#if CONFIG_ETH_USE_ESP32_EMAC
#if defined __has_include && __has_include("esp_eth_phy_lan867x.h")
#define ETH_PHY_LAN867X_SUPPORTED 1
#endif
#define ETH_PHY_IP101 ETH_PHY_TLK110
#if CONFIG_IDF_TARGET_ESP32
typedef enum {
Expand Down Expand Up @@ -138,6 +141,9 @@ typedef enum {
ETH_PHY_DP83848,
ETH_PHY_KSZ8041,
ETH_PHY_KSZ8081,
#if ETH_PHY_LAN867X_SUPPORTED
ETH_PHY_LAN867X,
#endif
#endif /* CONFIG_ETH_USE_ESP32_EMAC */
#if CONFIG_ETH_SPI_ETHERNET_DM9051
ETH_PHY_DM9051,
Expand Down
Loading