mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
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>
This commit is contained in:
committed by
Damien George
parent
54e85fe212
commit
30db33d1e0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user