summaryrefslogtreecommitdiff
path: root/ports/esp32/network_lan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/network_lan.c')
-rw-r--r--ports/esp32/network_lan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/esp32/network_lan.c b/ports/esp32/network_lan.c
index d482f9506..d4d630e34 100644
--- a/ports/esp32/network_lan.c
+++ b/ports/esp32/network_lan.c
@@ -150,6 +150,9 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
#if ESP_IDF_VERSION_MINOR >= 3 // KSZ8041 is new in ESP-IDF v4.3
args[ARG_phy_type].u_int != PHY_KSZ8041 &&
#endif
+ #if ESP_IDF_VERSION_MINOR >= 4 // KSZ8081 is new in ESP-IDF v4.4
+ args[ARG_phy_type].u_int != PHY_KSZ8081 &&
+ #endif
#if CONFIG_ETH_USE_SPI_ETHERNET
#if CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL
args[ARG_phy_type].u_int != PHY_KSZ8851SNL &&
@@ -237,6 +240,11 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
self->phy = esp_eth_phy_new_ksz8041(&phy_config);
break;
#endif
+ #if ESP_IDF_VERSION_MINOR >= 4 // KSZ8081 is new in ESP-IDF v4.4
+ case PHY_KSZ8081:
+ self->phy = esp_eth_phy_new_ksz8081(&phy_config);
+ break;
+ #endif
#endif
#if CONFIG_ETH_USE_SPI_ETHERNET
#if CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL