esp32: Remove obsolete IDF v3 code wrapped in MICROPY_ESP_IDF_4.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
a915002177
commit
f12462ddc4
|
@ -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_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_load_binary), MP_ROM_PTR(&esp32_ulp_load_binary_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_run), MP_ROM_PTR(&esp32_ulp_run_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) },
|
{ 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);
|
STATIC MP_DEFINE_CONST_DICT(esp32_ulp_locals_dict, esp32_ulp_locals_dict_table);
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,7 @@
|
||||||
#include "esp_task.h"
|
#include "esp_task.h"
|
||||||
#include "soc/cpu.h"
|
#include "soc/cpu.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#if MICROPY_ESP_IDF_4
|
|
||||||
#include "esp32/spiram.h"
|
#include "esp32/spiram.h"
|
||||||
#else
|
|
||||||
#include "esp_spiram.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "py/stackctrl.h"
|
#include "py/stackctrl.h"
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if !MICROPY_ESP_IDF_4
|
|
||||||
#include "rom/gpio.h"
|
|
||||||
#endif
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_spi_flash.h"
|
#include "esp_spi_flash.h"
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,9 @@
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#if MICROPY_ESP_IDF_4
|
|
||||||
#include "esp32/rom/rtc.h"
|
#include "esp32/rom/rtc.h"
|
||||||
#include "esp32/clk.h"
|
#include "esp32/clk.h"
|
||||||
#include "esp_sleep.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 "esp_pm.h"
|
||||||
#include "driver/touch_pad.h"
|
#include "driver/touch_pad.h"
|
||||||
|
|
||||||
|
|
|
@ -55,18 +55,6 @@
|
||||||
#include "lwip/igmp.h"
|
#include "lwip/igmp.h"
|
||||||
#include "esp_log.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 SOCKET_POLL_US (100000)
|
||||||
#define MDNS_QUERY_TIMEOUT_MS (5000)
|
#define MDNS_QUERY_TIMEOUT_MS (5000)
|
||||||
#define MDNS_LOCAL_SUFFIX ".local"
|
#define MDNS_LOCAL_SUFFIX ".local"
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
|
|
||||||
#if !MICROPY_ESP_IDF_4
|
|
||||||
#include "rom/ets_sys.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// object representation and NLR handling
|
// object representation and NLR handling
|
||||||
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A)
|
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A)
|
||||||
#define MICROPY_NLR_SETJMP (1)
|
#define MICROPY_NLR_SETJMP (1)
|
||||||
|
|
|
@ -32,12 +32,7 @@
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
#if MICROPY_ESP_IDF_4
|
|
||||||
#include "esp32/rom/uart.h"
|
#include "esp32/rom/uart.h"
|
||||||
#else
|
|
||||||
#include "rom/uart.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "py/objstr.h"
|
#include "py/objstr.h"
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
#include "mpthreadport.h"
|
#include "mpthreadport.h"
|
||||||
|
|
||||||
#include "esp_task.h"
|
#include "esp_task.h"
|
||||||
#if !MICROPY_ESP_IDF_4
|
|
||||||
#include "freertos/semphr.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if MICROPY_PY_THREAD
|
#if MICROPY_PY_THREAD
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue