Skip to content

Commit 23d9a65

Browse files
committed
I might have found the issue with the RGB driver.
1 parent 50b49ed commit 23d9a65

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ext_mod/lcd_bus/include/esp32/rgb_bus.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
mp_lcd_sw_rotation_t sw_rot;
3838

3939
esp_lcd_rgb_panel_config_t *panel_io_config;
40-
void *padding;
41-
42-
/* specific to bus */
4340
esp_lcd_panel_handle_t panel_handle;
4441

4542
};

ext_mod/lcd_bus/src/esp32/rgb_bus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237

238238
self->callback = mp_const_none;
239239

240-
self->panel_io_config = malloc(sizeof(esp_lcd_rgb_panel_config_t));
240+
self->panel_io_config = (esp_lcd_rgb_panel_config_t *)malloc(sizeof(esp_lcd_rgb_panel_config_t));
241241

242242
esp_lcd_rgb_panel_config_t *panel_io_config = self->panel_io_config;
243243

@@ -282,8 +282,6 @@
282282
panel_io_config->sram_trans_align = 8;
283283
panel_io_config->psram_trans_align = 64;
284284
panel_io_config->flags.refresh_on_demand = (uint32_t)args[ARG_refresh_on_demand].u_bool;
285-
panel_io_config->flags.fb_in_psram = 0;
286-
panel_io_config->flags.double_fb = 0;
287285

288286
int i = 0;
289287
for (; i < 16; i++) {
@@ -397,6 +395,7 @@
397395
self->panel_io_config->bits_per_pixel = data->bytes_per_pixel * 8;
398396
self->panel_io_config->flags.fb_in_psram = 1;
399397
self->panel_io_config->flags.double_fb = 1;
398+
self->panel_io_config->num_fbs = 2;
400399

401400
self->sw_rot.init.cb = &rgb_init_cb;
402401
self->sw_rot.flush_cb = &rgb_flush_cb;
@@ -411,6 +410,7 @@
411410
LCD_DEBUG_PRINT("fb_in_psram=%d\n", self->panel_io_config->flags.fb_in_psram)
412411
LCD_DEBUG_PRINT("double_fb=%d\n", self->panel_io_config->flags.double_fb)
413412
LCD_DEBUG_PRINT("rgb565_byte_swap=%d\n", data->rgb565_swap)
413+
LCD_DEBUG_PRINT("rgb565_byte_swap=%d\n", self->panel_io_config->num_fbs)
414414

415415
return LCD_OK;
416416
}

0 commit comments

Comments
 (0)