Browse Source

esp32: Remove obsolete IDF v3 code wrapped in MICROPY_ESP_IDF_4.

Signed-off-by: Damien George <damien@micropython.org>
pull/6906/head
Damien George 4 years ago
parent
commit
f12462ddc4
  1. 4
      ports/esp32/esp32_ulp.c
  2. 4
      ports/esp32/main.c
  3. 3
      ports/esp32/modesp.c
  4. 6
      ports/esp32/modmachine.c
  5. 12
      ports/esp32/modsocket.c
  6. 4
      ports/esp32/mpconfigport.h
  7. 5
      ports/esp32/mphalport.c
  8. 3
      ports/esp32/mpthreadport.c

4
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);

4
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"

3
ports/esp32/modesp.c

@ -29,9 +29,6 @@
#include <stdio.h>
#if !MICROPY_ESP_IDF_4
#include "rom/gpio.h"
#endif
#include "esp_log.h"
#include "esp_spi_flash.h"

6
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"

12
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"

4
ports/esp32/mpconfigport.h

@ -8,10 +8,6 @@
#include <alloca.h>
#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)

5
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"

3
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

Loading…
Cancel
Save