e4650125b8
This commit updates the esp32 port to work exclusively with ESP-IDF v5. IDF v5 is needed for some of the newer ESP32 SoCs to work, and it also cleans up a lot of the inconsistencies between existing SoCs (eg S2, S3, and C3). Support for IDF v4 is dropped because it's a lot of effort to maintain both versions at the same time. The following components have been verified to work on the various SoCs: ESP32 ESP32-S2 ESP32-S3 ESP32-C3 build pass pass pass pass SPIRAM pass pass pass N/A REPL (UART) pass pass pass pass REPL (USB) N/A pass pass N/A filesystem pass pass pass pass GPIO pass pass pass pass SPI pass pass pass pass I2C pass pass pass pass PWM pass pass pass pass ADC pass pass pass pass WiFi STA pass pass pass pass WiFi AP pass pass pass pass BLE pass N/A pass pass ETH pass -- -- -- PPP pass pass pass -- sockets pass pass pass pass SSL pass ENOMEM pass pass RMT pass pass pass pass NeoPixel pass pass pass pass I2S pass pass pass N/A ESPNow pass pass pass pass ULP-FSM pass pass pass N/A SDCard pass N/A N/A pass WDT pass pass pass pass Signed-off-by: Damien George <damien@micropython.org> Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
71 lines
3.4 KiB
C
71 lines
3.4 KiB
C
{ MP_ROM_QSTR(MP_QSTR___init__), MP_ROM_PTR(&esp_network_initialize_obj) },
|
|
|
|
#if MICROPY_PY_NETWORK_WLAN
|
|
{ MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&esp_network_wlan_type) },
|
|
#endif
|
|
|
|
#if MICROPY_PY_NETWORK_LAN
|
|
{ MP_ROM_QSTR(MP_QSTR_LAN), MP_ROM_PTR(&esp_network_get_lan_obj) },
|
|
#endif
|
|
{ MP_ROM_QSTR(MP_QSTR_PPP), MP_ROM_PTR(&esp_network_ppp_make_new_obj) },
|
|
{ MP_ROM_QSTR(MP_QSTR_phy_mode), MP_ROM_PTR(&esp_network_phy_mode_obj) },
|
|
|
|
#if MICROPY_PY_NETWORK_WLAN
|
|
{ MP_ROM_QSTR(MP_QSTR_STA_IF), MP_ROM_INT(WIFI_IF_STA)},
|
|
{ MP_ROM_QS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R_AUTH_MAX), MP_ROM_INT(WIFI_AUTH_MAX) },
|
|
#endif
|
|
|
|
#if MICROPY_PY_NETWORK_LAN
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_LAN8710), MP_ROM_INT(PHY_LAN8710) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_LAN8720), MP_ROM_INT(PHY_LAN8720) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_IP101), MP_ROM_INT(PHY_IP101) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_RTL8201), MP_ROM_INT(PHY_RTL8201) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_DP83848), MP_ROM_INT(PHY_DP83848) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_KSZ8041), MP_ROM_INT(PHY_KSZ8041) },
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_KSZ8081), MP_ROM_INT(PHY_KSZ8081) },
|
|
|
|
#if CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_KSZ8851SNL), MP_ROM_INT(PHY_KSZ8851SNL) },
|
|
#endif
|
|
#if CONFIG_ETH_SPI_ETHERNET_DM9051
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_DM9051), MP_ROM_INT(PHY_DM9051) },
|
|
#endif
|
|
#if CONFIG_ETH_SPI_ETHERNET_W5500
|
|
{ MP_ROM_QSTR(MP_QSTR_PHY_W5500), MP_ROM_INT(PHY_W5500) },
|
|
#endif
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_INITIALIZED), MP_ROM_INT(ETH_INITIALIZED)},
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_STARTED), MP_ROM_INT(ETH_STARTED)},
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_STOPPED), MP_ROM_INT(ETH_STOPPED)},
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_CONNECTED), MP_ROM_INT(ETH_CONNECTED)},
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_DISCONNECTED), MP_ROM_INT(ETH_DISCONNECTED)},
|
|
{ MP_ROM_QSTR(MP_QSTR_ETH_GOT_IP), MP_ROM_INT(ETH_GOT_IP)},
|
|
#endif
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_IDLE), MP_ROM_INT(STAT_IDLE)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_CONNECTING), MP_ROM_INT(STAT_CONNECTING)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_GOT_IP), MP_ROM_INT(STAT_GOT_IP)},
|
|
// Errors from the ESP-IDF
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_NO_AP_FOUND), MP_ROM_INT(WIFI_REASON_NO_AP_FOUND)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_WRONG_PASSWORD), MP_ROM_INT(WIFI_REASON_AUTH_FAIL)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_BEACON_TIMEOUT), MP_ROM_INT(WIFI_REASON_BEACON_TIMEOUT)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_ASSOC_FAIL), MP_ROM_INT(WIFI_REASON_ASSOC_FAIL)},
|
|
{ MP_ROM_QSTR(MP_QSTR_STAT_HANDSHAKE_TIMEOUT), MP_ROM_INT(WIFI_REASON_HANDSHAKE_TIMEOUT)},
|