File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed
libraries/Ethernet/examples Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 55
66// Important to be defined BEFORE including ETH.h for ETH.begin() to work.
77// Example RMII LAN8720 (Olimex, etc.)
8- #ifndef ETH_PHY_TYPE
8+ #ifndef ETH_PHY_MDC
99#define ETH_PHY_TYPE ETH_PHY_LAN8720
10+ #if CONFIG_IDF_TARGET_ESP32
1011#define ETH_PHY_ADDR 0
1112#define ETH_PHY_MDC 23
1213#define ETH_PHY_MDIO 18
1314#define ETH_PHY_POWER -1
1415#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
16+ #elif CONFIG_IDF_TARGET_ESP32P4
17+ #define ETH_PHY_ADDR 0
18+ #define ETH_PHY_MDC 31
19+ #define ETH_PHY_MDIO 52
20+ #define ETH_PHY_POWER 51
21+ #define ETH_CLK_MODE EMAC_CLK_EXT_IN
22+ #endif
1523#endif
1624
1725#include < ETH.h>
Original file line number Diff line number Diff line change 55
66#include < ETH.h>
77
8- #ifndef ETH_PHY_TYPE
8+ #ifndef ETH_PHY_MDC
99#define ETH_PHY_TYPE ETH_PHY_TLK110
1010#if CONFIG_IDF_TARGET_ESP32
1111#define ETH_PHY_ADDR 31
Original file line number Diff line number Diff line change 99// Set this to 1 to enable dual Ethernet support
1010#define USE_TWO_ETH_PORTS 0
1111
12- #ifndef ETH_PHY_TYPE
12+ #ifndef ETH_PHY_CS
1313#define ETH_PHY_TYPE ETH_PHY_W5500
1414#define ETH_PHY_ADDR 1
1515#define ETH_PHY_CS 15
2424
2525#if USE_TWO_ETH_PORTS
2626// Second port on shared SPI bus
27- #ifndef ETH1_PHY_TYPE
27+ #ifndef ETH1_PHY_CS
2828#define ETH1_PHY_TYPE ETH_PHY_W5500
2929#define ETH1_PHY_ADDR 1
3030#define ETH1_PHY_CS 32
Original file line number Diff line number Diff line change 88// Set this to 1 to enable dual Ethernet support
99#define USE_TWO_ETH_PORTS 0
1010
11- #ifndef ETH_PHY_TYPE
11+ #ifndef ETH_PHY_CS
1212#define ETH_PHY_TYPE ETH_PHY_W5500
1313#define ETH_PHY_ADDR 1
1414#define ETH_PHY_CS 15
2222
2323#if USE_TWO_ETH_PORTS
2424// Second port on shared SPI bus
25- #ifndef ETH1_PHY_TYPE
25+ #ifndef ETH1_PHY_CS
2626#define ETH1_PHY_TYPE ETH_PHY_W5500
2727#define ETH1_PHY_ADDR 1
2828#define ETH1_PHY_CS 32
You can’t perform that action at this time.
0 commit comments