Skip to content

Commit 25c7a7b

Browse files
committed
feat(ports): update esp32
1 parent a19fd8e commit 25c7a7b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ports/esp32/boards/ESP32_S3_BOX_3/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#define MICROPY_HW_I2C0_SDA (8)
1212

1313
#define MICROPY_LV_USE_LOG (0)
14-
#define MICROPY_TASK_STACK_SIZE (50 * 1024)
14+
#define MICROPY_GC_INITIAL_HEAP_SIZE (1024 * 1024)

ports/esp32/main_esp32s3_box3/main.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ void mp_task(void *pvParameter) {
105105
mp_thread_init(pxTaskGetStackStart(NULL), MICROPY_TASK_STACK_SIZE / sizeof(uintptr_t));
106106
#endif
107107
#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
108-
// usb_serial_jtag_init();
108+
usb_serial_jtag_init();
109109
#elif CONFIG_USB_OTG_SUPPORTED
110-
// usb_init();
110+
usb_init();
111111
#endif
112112
#if MICROPY_HW_ENABLE_UART_REPL
113113
uart_stdout_init();
@@ -262,6 +262,12 @@ MP_REGISTER_ROOT_POINTER(mp_obj_t native_code_pointers);
262262

263263
static void init_lvgl_port()
264264
{
265+
static bool is_initialized = false;
266+
267+
if (is_initialized) {
268+
return;
269+
}
270+
265271
printf("Turn off LCD backlight\n");
266272
bsp_display_brightness_init();
267273
bsp_display_backlight_off();
@@ -293,4 +299,6 @@ static void init_lvgl_port()
293299
};
294300
/* Register done callback */
295301
ESP_ERROR_CHECK(esp_lcd_panel_io_register_event_callbacks(io_handle, &cbs, disp));
302+
303+
is_initialized = true;
296304
}

0 commit comments

Comments
 (0)