mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
Merge branch 'feat/support_rgb_lcd_dma2d_v6.0' into 'release/v6.0'
feat(rgb_lcd): support draw bitmap using dma2d (v6.0) See merge request espressif/esp-idf!51980
This commit is contained in:
@@ -25,6 +25,14 @@ menu "Example Configuration"
|
||||
Allocate one draw buffer in LVGL.
|
||||
endchoice
|
||||
|
||||
config EXAMPLE_USE_DMA2D_COPY_FRAME
|
||||
bool "Use DMA2D to copy draw buffer to frame buffer"
|
||||
default y
|
||||
depends on EXAMPLE_USE_SINGLE_FB && SOC_DMA2D_SUPPORTED
|
||||
help
|
||||
Enable this option, DMA2D will be used to copy the LVGL draw buffer to the target frame buffer.
|
||||
This can save some CPU time and improve the performance.
|
||||
|
||||
choice EXAMPLE_LCD_DATA_LINES
|
||||
prompt "RGB LCD Data Lines"
|
||||
default EXAMPLE_LCD_DATA_LINES_16
|
||||
|
||||
@@ -271,6 +271,12 @@ void app_main(void)
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&panel_config, &panel_handle));
|
||||
|
||||
#if CONFIG_EXAMPLE_USE_DMA2D_COPY_FRAME
|
||||
// use DMA2D to copy draw buffer to frame buffer
|
||||
ESP_LOGI(TAG, "RGB panel added DMA2D draw bitmap hook");
|
||||
ESP_ERROR_CHECK(esp_lcd_rgb_panel_enable_dma2d(panel_handle));
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "Initialize RGB LCD panel");
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));
|
||||
|
||||
Reference in New Issue
Block a user