Skip to content

Commit

Permalink
fix (esp_lcd): make sure fb bit depth is set before calling trans_link
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitman committed Jan 20, 2024
1 parent 19257e7 commit 25fba0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_lcd/src/esp_lcd_panel_rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ esp_err_t esp_lcd_new_rgb_panel(const esp_lcd_rgb_panel_config_t *rgb_panel_conf

// install DMA service
rgb_panel->flags.stream_mode = !rgb_panel_config->flags.refresh_on_demand;
rgb_panel->fb_bits_per_pixel = fb_bits_per_pixel;
ret = lcd_rgb_panel_create_trans_link(rgb_panel);
ESP_GOTO_ON_ERROR(ret, err, TAG, "install DMA failed");
// configure GPIO
Expand All @@ -338,7 +339,6 @@ esp_err_t esp_lcd_new_rgb_panel(const esp_lcd_rgb_panel_config_t *rgb_panel_conf
memcpy(rgb_panel->data_gpio_nums, rgb_panel_config->data_gpio_nums, SOC_LCD_RGB_DATA_WIDTH);
rgb_panel->timings = rgb_panel_config->timings;
rgb_panel->data_width = rgb_panel_config->data_width;
rgb_panel->fb_bits_per_pixel = fb_bits_per_pixel;
rgb_panel->output_bits_per_pixel = fb_bits_per_pixel; // by default, the output bpp is the same as the frame buffer bpp
rgb_panel->disp_gpio_num = rgb_panel_config->disp_gpio_num;
rgb_panel->flags.disp_en_level = !rgb_panel_config->flags.disp_active_low;
Expand Down

0 comments on commit 25fba0a

Please sign in to comment.