From a435e4ecfd87b8aa7720d0429acbd4043965b7e5 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 12 Nov 2025 15:47:27 +1100 Subject: [PATCH] esp32: Take global dependencies out of mpconfigport.h. This is necessary so the ESP-IDF TinyUSB component can include py/mpconfig.h, but is also a good design goal (less creep of symbols into unrelated parts of the code). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton --- ports/esp32/machine_i2s.c | 2 +- ports/esp32/modnetwork.h | 1 + ports/esp32/mpconfigport.h | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/esp32/machine_i2s.c b/ports/esp32/machine_i2s.c index ba6377a766..27b70f1c8a 100644 --- a/ports/esp32/machine_i2s.c +++ b/ports/esp32/machine_i2s.c @@ -470,4 +470,4 @@ static void mp_machine_i2s_irq_update(machine_i2s_obj_t *self) { } } -MP_REGISTER_ROOT_POINTER(struct _machine_i2s_obj_t *machine_i2s_obj[I2S_NUM_AUTO]); +MP_REGISTER_ROOT_POINTER(struct _machine_i2s_obj_t *machine_i2s_obj[SOC_I2S_NUM]); diff --git a/ports/esp32/modnetwork.h b/ports/esp32/modnetwork.h index ba69d5cc0f..a68db41a3e 100644 --- a/ports/esp32/modnetwork.h +++ b/ports/esp32/modnetwork.h @@ -26,6 +26,7 @@ #ifndef MICROPY_INCLUDED_ESP32_MODNETWORK_H #define MICROPY_INCLUDED_ESP32_MODNETWORK_H +#include "esp_wifi_types.h" #include "esp_netif.h" // lan867x component requires newer IDF version diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index fafed3961c..142da4b230 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -9,8 +9,6 @@ #include "esp_random.h" #include "esp_system.h" #include "freertos/FreeRTOS.h" -#include "driver/i2s_std.h" -#include "esp_wifi_types.h" #ifndef MICROPY_CONFIG_ROM_LEVEL #define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)