File tree 4 files changed +14
-6
lines changed
libraries/Ethernet/examples
4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
// Important to be defined BEFORE including ETH.h for ETH.begin() to work.
7
7
// Example RMII LAN8720 (Olimex, etc.)
8
- #ifndef ETH_PHY_TYPE
8
+ #ifndef ETH_PHY_MDC
9
9
#define ETH_PHY_TYPE ETH_PHY_LAN8720
10
+ #if CONFIG_IDF_TARGET_ESP32
10
11
#define ETH_PHY_ADDR 0
11
12
#define ETH_PHY_MDC 23
12
13
#define ETH_PHY_MDIO 18
13
14
#define ETH_PHY_POWER -1
14
15
#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
15
23
#endif
16
24
17
25
#include < ETH.h>
Original file line number Diff line number Diff line change 5
5
6
6
#include < ETH.h>
7
7
8
- #ifndef ETH_PHY_TYPE
8
+ #ifndef ETH_PHY_MDC
9
9
#define ETH_PHY_TYPE ETH_PHY_TLK110
10
10
#if CONFIG_IDF_TARGET_ESP32
11
11
#define ETH_PHY_ADDR 31
Original file line number Diff line number Diff line change 9
9
// Set this to 1 to enable dual Ethernet support
10
10
#define USE_TWO_ETH_PORTS 0
11
11
12
- #ifndef ETH_PHY_TYPE
12
+ #ifndef ETH_PHY_CS
13
13
#define ETH_PHY_TYPE ETH_PHY_W5500
14
14
#define ETH_PHY_ADDR 1
15
15
#define ETH_PHY_CS 15
24
24
25
25
#if USE_TWO_ETH_PORTS
26
26
// Second port on shared SPI bus
27
- #ifndef ETH1_PHY_TYPE
27
+ #ifndef ETH1_PHY_CS
28
28
#define ETH1_PHY_TYPE ETH_PHY_W5500
29
29
#define ETH1_PHY_ADDR 1
30
30
#define ETH1_PHY_CS 32
Original file line number Diff line number Diff line change 8
8
// Set this to 1 to enable dual Ethernet support
9
9
#define USE_TWO_ETH_PORTS 0
10
10
11
- #ifndef ETH_PHY_TYPE
11
+ #ifndef ETH_PHY_CS
12
12
#define ETH_PHY_TYPE ETH_PHY_W5500
13
13
#define ETH_PHY_ADDR 1
14
14
#define ETH_PHY_CS 15
22
22
23
23
#if USE_TWO_ETH_PORTS
24
24
// Second port on shared SPI bus
25
- #ifndef ETH1_PHY_TYPE
25
+ #ifndef ETH1_PHY_CS
26
26
#define ETH1_PHY_TYPE ETH_PHY_W5500
27
27
#define ETH1_PHY_ADDR 1
28
28
#define ETH1_PHY_CS 32
You can’t perform that action at this time.
0 commit comments