From f12462ddc4cd847896a38412539a49ccb0579c94 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 15 Feb 2021 23:22:05 +1100 Subject: [PATCH] esp32: Remove obsolete IDF v3 code wrapped in MICROPY_ESP_IDF_4. Signed-off-by: Damien George --- ports/esp32/esp32_ulp.c | 4 ---- ports/esp32/main.c | 4 ---- ports/esp32/modesp.c | 3 --- ports/esp32/modmachine.c | 6 ------ ports/esp32/modsocket.c | 12 ------------ ports/esp32/mpconfigport.h | 4 ---- ports/esp32/mphalport.c | 5 ----- ports/esp32/mpthreadport.c | 3 --- 8 files changed, 41 deletions(-) diff --git a/ports/esp32/esp32_ulp.c b/ports/esp32/esp32_ulp.c index 4e9d768146..50244cdf25 100644 --- a/ports/esp32/esp32_ulp.c +++ b/ports/esp32/esp32_ulp.c @@ -85,11 +85,7 @@ STATIC const mp_rom_map_elem_t esp32_ulp_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_wakeup_period), MP_ROM_PTR(&esp32_ulp_set_wakeup_period_obj) }, { MP_ROM_QSTR(MP_QSTR_load_binary), MP_ROM_PTR(&esp32_ulp_load_binary_obj) }, { MP_ROM_QSTR(MP_QSTR_run), MP_ROM_PTR(&esp32_ulp_run_obj) }, - #if !MICROPY_ESP_IDF_4 - { MP_ROM_QSTR(MP_QSTR_RESERVE_MEM), MP_ROM_INT(CONFIG_ULP_COPROC_RESERVE_MEM) }, - #else { MP_ROM_QSTR(MP_QSTR_RESERVE_MEM), MP_ROM_INT(CONFIG_ESP32_ULP_COPROC_RESERVE_MEM) }, - #endif }; STATIC MP_DEFINE_CONST_DICT(esp32_ulp_locals_dict, esp32_ulp_locals_dict_table); diff --git a/ports/esp32/main.c b/ports/esp32/main.c index 6f9ab82d05..001f2beaeb 100644 --- a/ports/esp32/main.c +++ b/ports/esp32/main.c @@ -37,11 +37,7 @@ #include "esp_task.h" #include "soc/cpu.h" #include "esp_log.h" -#if MICROPY_ESP_IDF_4 #include "esp32/spiram.h" -#else -#include "esp_spiram.h" -#endif #include "py/stackctrl.h" #include "py/nlr.h" diff --git a/ports/esp32/modesp.c b/ports/esp32/modesp.c index 369649c119..59a261e8c2 100644 --- a/ports/esp32/modesp.c +++ b/ports/esp32/modesp.c @@ -29,9 +29,6 @@ #include -#if !MICROPY_ESP_IDF_4 -#include "rom/gpio.h" -#endif #include "esp_log.h" #include "esp_spi_flash.h" diff --git a/ports/esp32/modmachine.c b/ports/esp32/modmachine.c index 303d25ee8b..bb346ea1cd 100644 --- a/ports/esp32/modmachine.c +++ b/ports/esp32/modmachine.c @@ -32,15 +32,9 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#if MICROPY_ESP_IDF_4 #include "esp32/rom/rtc.h" #include "esp32/clk.h" #include "esp_sleep.h" -#else -#include "rom/ets_sys.h" -#include "rom/rtc.h" -#include "esp_clk.h" -#endif #include "esp_pm.h" #include "driver/touch_pad.h" diff --git a/ports/esp32/modsocket.c b/ports/esp32/modsocket.c index 8a4cf3e165..ce7a714eb2 100644 --- a/ports/esp32/modsocket.c +++ b/ports/esp32/modsocket.c @@ -55,18 +55,6 @@ #include "lwip/igmp.h" #include "esp_log.h" -#if !MICROPY_ESP_IDF_4 -#define lwip_bind lwip_bind_r -#define lwip_listen lwip_listen_r -#define lwip_accept lwip_accept_r -#define lwip_setsockopt lwip_setsockopt_r -#define lwip_fnctl lwip_fnctl_r -#define lwip_recvfrom lwip_recvfrom_r -#define lwip_write lwip_write_r -#define lwip_sendto lwip_sendto_r -#define lwip_close lwip_close_r -#endif - #define SOCKET_POLL_US (100000) #define MDNS_QUERY_TIMEOUT_MS (5000) #define MDNS_LOCAL_SUFFIX ".local" diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index 34be9405e4..7b0a00250b 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -8,10 +8,6 @@ #include #include "esp_system.h" -#if !MICROPY_ESP_IDF_4 -#include "rom/ets_sys.h" -#endif - // object representation and NLR handling #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A) #define MICROPY_NLR_SETJMP (1) diff --git a/ports/esp32/mphalport.c b/ports/esp32/mphalport.c index 5403382684..65fa88e4d0 100644 --- a/ports/esp32/mphalport.c +++ b/ports/esp32/mphalport.c @@ -32,12 +32,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" - -#if MICROPY_ESP_IDF_4 #include "esp32/rom/uart.h" -#else -#include "rom/uart.h" -#endif #include "py/obj.h" #include "py/objstr.h" diff --git a/ports/esp32/mpthreadport.c b/ports/esp32/mpthreadport.c index d294c92727..140a76464f 100644 --- a/ports/esp32/mpthreadport.c +++ b/ports/esp32/mpthreadport.c @@ -34,9 +34,6 @@ #include "mpthreadport.h" #include "esp_task.h" -#if !MICROPY_ESP_IDF_4 -#include "freertos/semphr.h" -#endif #if MICROPY_PY_THREAD