diff options
| author | ma-lalonde <marc@connaxio.com> | 2022-05-30 01:16:51 -0400 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-01-19 22:50:41 +1100 |
| commit | 30db33d1e024c9c16140ed8f44283728b1428fac (patch) | |
| tree | 4f068a3bc673f59a889d5c7565b2506cd52f7269 /ports/esp32/network_lan.c | |
| parent | 54e85fe212b15390b60246846e5f2087d566aeda (diff) | |
esp32/network_lan: Add support for Ethernet PHY KSZ8081.
This is available since ESP-IDF v4.4.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32/network_lan.c')
| -rw-r--r-- | ports/esp32/network_lan.c | 8 |
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 |
