File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11
11
#define MICROPY_HW_I2C0_SDA (8)
12
12
13
13
#define MICROPY_LV_USE_LOG (0)
14
- #define MICROPY_TASK_STACK_SIZE (50 * 1024)
14
+ #define MICROPY_GC_INITIAL_HEAP_SIZE (1024 * 1024)
Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ void mp_task(void *pvParameter) {
105
105
mp_thread_init (pxTaskGetStackStart (NULL ), MICROPY_TASK_STACK_SIZE / sizeof (uintptr_t ));
106
106
#endif
107
107
#if CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
108
- // usb_serial_jtag_init();
108
+ usb_serial_jtag_init ();
109
109
#elif CONFIG_USB_OTG_SUPPORTED
110
- // usb_init();
110
+ usb_init ();
111
111
#endif
112
112
#if MICROPY_HW_ENABLE_UART_REPL
113
113
uart_stdout_init ();
@@ -262,6 +262,12 @@ MP_REGISTER_ROOT_POINTER(mp_obj_t native_code_pointers);
262
262
263
263
static void init_lvgl_port ()
264
264
{
265
+ static bool is_initialized = false;
266
+
267
+ if (is_initialized ) {
268
+ return ;
269
+ }
270
+
265
271
printf ("Turn off LCD backlight\n" );
266
272
bsp_display_brightness_init ();
267
273
bsp_display_backlight_off ();
@@ -293,4 +299,6 @@ static void init_lvgl_port()
293
299
};
294
300
/* Register done callback */
295
301
ESP_ERROR_CHECK (esp_lcd_panel_io_register_event_callbacks (io_handle , & cbs , disp ));
302
+
303
+ is_initialized = true;
296
304
}
You can’t perform that action at this time.
0 commit comments