Unverified Commit 1ac3aefa authored by Darek7D's avatar Darek7D Committed by GitHub

Add KSZ8041 support (#6087)

parent e84e9c15
......@@ -281,6 +281,13 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
eth_phy = esp_eth_phy_new_dm9051(&phy_config);
break;
#endif
case ETH_PHY_KSZ8041:
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,4,0)
eth_phy = esp_eth_phy_new_ksz8041(&phy_config);
#else
log_e("unsupported ethernet type 'ETH_PHY_KSZ8041'");
#endif
break;
case ETH_PHY_KSZ8081:
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4,4,0)
eth_phy = esp_eth_phy_new_ksz8081(&phy_config);
......
......@@ -53,7 +53,7 @@
typedef enum { ETH_CLOCK_GPIO0_IN, ETH_CLOCK_GPIO0_OUT, ETH_CLOCK_GPIO16_OUT, ETH_CLOCK_GPIO17_OUT } eth_clock_mode_t;
#endif
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;
typedef enum { ETH_PHY_LAN8720, ETH_PHY_TLK110, ETH_PHY_RTL8201, ETH_PHY_DP83848, ETH_PHY_DM9051, ETH_PHY_KSZ8041, ETH_PHY_KSZ8081, ETH_PHY_MAX } eth_phy_type_t;
#define ETH_PHY_IP101 ETH_PHY_TLK110
class ETHClass {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment