Add KSZ8041 support (#6087)

This commit is contained in:
Darek7D
2022-01-17 15:14:09 +01:00
committed by GitHub
parent e84e9c153e
commit 1ac3aefa61
2 changed files with 8 additions and 1 deletions

View File

@ -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);

View File

@ -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 {