08-06-2024, 05:14 PM
(08-06-2024, 02:07 PM)tonbor Wrote:(08-05-2024, 03:29 PM)admin Wrote: modify config file for ethernet gpio pin define.
This are the defines, should not cause this compiler error:
// I²C-address of Ethernet PHY (0 or 1 for LAN8720, 31 for TLK110)
#ifndef ETH_PHY_ADDR
#define ETH_PHY_ADDR 1
#endif
// Type of the Ethernet PHY (LAN8720 or TLK110)
//typedef enum { ETH_PHY_LAN8720, ETH_PHY_TLK110, ETH_PHY_RTL8201, ETH_PHY_DP83848, ETH_PHY_DM9051, ETH_PHY_KSZ8081, ETH_PHY_MAX } eth_phy_type_t;
#ifndef ETH_PHY_TYPE
#define ETH_PHY_TYPE ETH_PHY_LAN8720
#endif
// Pin# of the enable signal for the external crystal oscillator (-1 to disable for internal APLL source)
#ifndef ETH_PHY_POWER
#define ETH_PHY_POWER 16
#endif
// Pin# of the I²C clock signal for the Ethernet PHY
#ifndef ETH_PHY_MDC
#define ETH_PHY_MDC 23
#endif
// Pin# of the I²C IO signal for the Ethernet PHY
#ifndef ETH_PHY_MDIO
#define ETH_PHY_MDIO 18
#endif
All source is wrong for the ethernet
//ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH wrong
ETH.begin(ETH_TYPE, ETH_ADDR, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_POWER_PIN , ETH_CLK_MODE); //start with ETH right