Skip to content

Commit a05e2c7

Browse files
committed
feat(eth): Add support for generic IEEE 802.3 driver
1 parent fcce93a commit a05e2c7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: libraries/Ethernet/src/ETH.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
283283

284284
esp_eth_phy_t *phy = NULL;
285285
switch (type) {
286+
case ETH_PHY_GENERIC: phy = esp_eth_phy_new_generic(&phy_config); break;
286287
case ETH_PHY_LAN8720: phy = esp_eth_phy_new_lan87xx(&phy_config); break;
287288
case ETH_PHY_TLK110: phy = esp_eth_phy_new_ip101(&phy_config); break;
288289
case ETH_PHY_RTL8201: phy = esp_eth_phy_new_rtl8201(&phy_config); break;

Diff for: libraries/Ethernet/src/ETH.h

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878

7979
#if CONFIG_ETH_USE_ESP32_EMAC
8080
#define ETH_PHY_IP101 ETH_PHY_TLK110
81+
#define ETH_PHY_JL1101 ETH_PHY_GENERIC
8182
#if CONFIG_IDF_TARGET_ESP32
8283
typedef enum {
8384
ETH_CLOCK_GPIO0_IN,
@@ -127,6 +128,7 @@ typedef emac_rmii_clock_mode_t eth_clock_mode_t;
127128

128129
typedef enum {
129130
#if CONFIG_ETH_USE_ESP32_EMAC
131+
ETH_PHY_GENERIC,
130132
ETH_PHY_LAN8720,
131133
ETH_PHY_TLK110,
132134
ETH_PHY_RTL8201,

0 commit comments

Comments
 (0)