Skip to content

Commit

Permalink
feat(eth): Add support for generic IEEE 802.3 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jan 14, 2025
1 parent fcce93a commit a05e2c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i

esp_eth_phy_t *phy = NULL;
switch (type) {
case ETH_PHY_GENERIC: phy = esp_eth_phy_new_generic(&phy_config); break;
case ETH_PHY_LAN8720: phy = esp_eth_phy_new_lan87xx(&phy_config); break;
case ETH_PHY_TLK110: phy = esp_eth_phy_new_ip101(&phy_config); break;
case ETH_PHY_RTL8201: phy = esp_eth_phy_new_rtl8201(&phy_config); break;
Expand Down
2 changes: 2 additions & 0 deletions libraries/Ethernet/src/ETH.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

#if CONFIG_ETH_USE_ESP32_EMAC
#define ETH_PHY_IP101 ETH_PHY_TLK110
#define ETH_PHY_JL1101 ETH_PHY_GENERIC
#if CONFIG_IDF_TARGET_ESP32
typedef enum {
ETH_CLOCK_GPIO0_IN,
Expand Down Expand Up @@ -127,6 +128,7 @@ typedef emac_rmii_clock_mode_t eth_clock_mode_t;

typedef enum {
#if CONFIG_ETH_USE_ESP32_EMAC
ETH_PHY_GENERIC,
ETH_PHY_LAN8720,
ETH_PHY_TLK110,
ETH_PHY_RTL8201,
Expand Down

0 comments on commit a05e2c7

Please sign in to comment.