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' into 'master'
feat(rgb_lcd): support draw bitmap using dma2d Closes IDF-15652 and IDFGH-11807 See merge request espressif/esp-idf!48510
This commit is contained in:
@@ -25,6 +25,14 @@ menu "RGB Panel 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
|
||||
|
||||
@@ -139,6 +139,12 @@ void app_main(void)
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
ESP_ERROR_CHECK(example_rgb_lcd_panel_new(&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(example_rgb_lcd_panel_init(panel_handle));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user