Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18cbd76

Browse filesBrowse files
committed
feat(eth): Add support for generic IEEE 802.3 driver (espressif#10859)
1 parent 50d85a6 commit 18cbd76
Copy full SHA for 18cbd76

File tree

Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-0
lines changed

‎libraries/Ethernet/src/ETH.cpp

Copy file name to clipboardExpand all lines: libraries/Ethernet/src/ETH.cpp
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ 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+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
287+
case ETH_PHY_GENERIC: phy = esp_eth_phy_new_generic(&phy_config); break;
288+
#endif
286289
case ETH_PHY_LAN8720: phy = esp_eth_phy_new_lan87xx(&phy_config); break;
287290
case ETH_PHY_TLK110: phy = esp_eth_phy_new_ip101(&phy_config); break;
288291
case ETH_PHY_RTL8201: phy = esp_eth_phy_new_rtl8201(&phy_config); break;

‎libraries/Ethernet/src/ETH.h

Copy file name to clipboardExpand all lines: libraries/Ethernet/src/ETH.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#ifndef _ETH_H_
2525
#define _ETH_H_
26+
#include "esp_idf_version.h"
2627

2728
//
2829
// Example configurations for pins_arduino.h to allow starting with ETH.begin();
@@ -127,6 +128,10 @@ typedef emac_rmii_clock_mode_t eth_clock_mode_t;
127128

128129
typedef enum {
129130
#if CONFIG_ETH_USE_ESP32_EMAC
131+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
132+
ETH_PHY_GENERIC,
133+
#define ETH_PHY_JL1101 ETH_PHY_GENERIC
134+
#endif
130135
ETH_PHY_LAN8720,
131136
ETH_PHY_TLK110,
132137
ETH_PHY_RTL8201,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.