Skip to content

Commit 07f41ae

Browse files
feat: Use new dma_burst_size member for IDF>=5.3
1 parent 3bb7bb1 commit 07f41ae

File tree

8 files changed

+41
-15
lines changed

8 files changed

+41
-15
lines changed

SquareLine/boards/v8/custom_waveshare_7inch/components/ws_7inch/idf_component.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: "1.0.2"
1+
version: "1.0.3"
22
description: Board Support Package for WaveShare 7inch
33
url: https://github.com/espressif/esp-bsp/SquareLine/boards/custom_waveshare_7inch/components/ws_7inch
44

55
dependencies:
6-
idf: ">=5.0"
6+
idf: ">=5.3"
77
esp_lcd_ra8875: "^1"
88
esp_lcd_touch_gt911: "^1"
99
lvgl/lvgl: "^8"

SquareLine/boards/v8/custom_waveshare_7inch/components/ws_7inch/ws_7inch.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: CC0-1.0
55
*/
@@ -84,8 +84,7 @@ esp_err_t bsp_display_new(const bsp_display_config_t *config, esp_lcd_panel_hand
8484
},
8585
.bus_width = BSP_LCD_WIDTH,
8686
.max_transfer_bytes = (BSP_LCD_H_RES) * 80 * sizeof(uint16_t),
87-
.psram_trans_align = 64,
88-
.sram_trans_align = 4,
87+
.dma_burst_size = 64,
8988
};
9089
ESP_RETURN_ON_ERROR(esp_lcd_new_i80_bus(&bus_config, &i80_bus), TAG, "I80 init failed");
9190

bsp/esp32_s3_lcd_ev_board/src/bsp_sub_board.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -104,7 +104,7 @@ drift, please enable `ESP32S3_DATA_CACHE_LINE_32B` instead");
104104
ESP_LOGI(TAG, "Initialize RGB panel");
105105
esp_lcd_rgb_panel_config_t rgb_conf = {
106106
.clk_src = LCD_CLK_SRC_PLL160M,
107-
.psram_trans_align = 64,
107+
.dma_burst_size = 64,
108108
.data_width = 16,
109109
.bits_per_pixel = 16,
110110
.de_gpio_num = BSP_LCD_SUB_BOARD_2_3_DE,
@@ -166,7 +166,7 @@ drift, please enable `ESP32S3_DATA_CACHE_LINE_32B` instead");
166166
ESP_LOGI(TAG, "Initialize RGB panel");
167167
esp_lcd_rgb_panel_config_t panel_conf = {
168168
.clk_src = LCD_CLK_SRC_PLL160M,
169-
.psram_trans_align = 64,
169+
.dma_burst_size = 64,
170170
.data_width = 16,
171171
.bits_per_pixel = 16,
172172
.de_gpio_num = BSP_LCD_SUB_BOARD_2_3_DE,

components/esp_lvgl_port/examples/rgb_lcd/main/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#include "esp_err.h"
88
#include "esp_log.h"
99
#include "esp_check.h"
10+
#include "esp_idf_version.h"
1011
#include "driver/i2c.h"
1112
#include "esp_lcd_panel_io.h"
1213
#include "esp_lcd_panel_ops.h"
@@ -96,7 +97,11 @@ static esp_err_t app_lcd_init(void)
9697
ESP_LOGI(TAG, "Initialize RGB panel");
9798
esp_lcd_rgb_panel_config_t panel_conf = {
9899
.clk_src = LCD_CLK_SRC_PLL160M,
100+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
99101
.psram_trans_align = 64,
102+
#else
103+
.dma_burst_size = 64,
104+
#endif
100105
.data_width = 16,
101106
.bits_per_pixel = 16,
102107
.de_gpio_num = EXAMPLE_LCD_GPIO_DE,

components/lcd/esp_lcd_gc9503/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ It's recommended to use the [esp_lcd_panel_io_additions](https://components.espr
5656
ESP_LOGI(TAG, "Install GC9503 panel driver");
5757
esp_lcd_rgb_panel_config_t rgb_config = {
5858
.clk_src = LCD_CLK_SRC_DEFAULT,
59-
.psram_trans_align = 64,
59+
.dma_burst_size = 64,
6060
.data_width = 16,
6161
.bits_per_pixel = 16,
6262
.de_gpio_num = EXAMPLE_LCD_IO_RGB_DE,

components/lcd/esp_lcd_gc9503/test_apps/main/test_esp_lcd_gc9503.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -13,6 +13,7 @@
1313
#include "driver/gpio.h"
1414
#include "esp_heap_caps.h"
1515
#include "esp_log.h"
16+
#include "esp_idf_version.h"
1617
#include "esp_lcd_panel_ops.h"
1718
#include "esp_lcd_panel_io.h"
1819
#include "esp_lcd_panel_io_additions.h"
@@ -104,7 +105,11 @@ TEST_CASE("test gc9503 to draw color bar with RGB interface, using GPIO", "[gc95
104105
ESP_LOGI(TAG, "Install GC9503 panel driver");
105106
esp_lcd_rgb_panel_config_t rgb_config = {
106107
.clk_src = LCD_CLK_SRC_DEFAULT,
108+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
107109
.psram_trans_align = 64,
110+
#else
111+
.dma_burst_size = 64,
112+
#endif
108113
.data_width = TEST_LCD_DATA_WIDTH,
109114
.bits_per_pixel = TEST_RGB_BIT_PER_PIXEL,
110115
.de_gpio_num = TEST_LCD_IO_RGB_DE,
@@ -191,7 +196,11 @@ TEST_CASE("test gc9503 to draw color bar with RGB interface, using IO expander",
191196
ESP_LOGI(TAG, "Install GC9503 panel driver");
192197
esp_lcd_rgb_panel_config_t rgb_config = {
193198
.clk_src = LCD_CLK_SRC_DEFAULT,
199+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
194200
.psram_trans_align = 64,
201+
#else
202+
.dma_burst_size = 64,
203+
#endif
195204
.data_width = TEST_LCD_DATA_WIDTH,
196205
.bits_per_pixel = TEST_RGB_BIT_PER_PIXEL,
197206
.de_gpio_num = TEST_LCD_IO_RGB_DE,

components/lcd/esp_lcd_ra8875/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ esp_lcd_i80_bus_config_t bus_config = {
6161
},
6262
.bus_width = BOARD_DISP_PARALLEL_WIDTH,
6363
.max_transfer_bytes = (BOARD_DISP_PARALLEL_HRES) * 80 * sizeof(uint16_t),
64-
.psram_trans_align = 64,
65-
.sram_trans_align = 4,
64+
.dma_burst_size = 64,
6665
};
6766
ESP_ERROR_CHECK(esp_lcd_new_i80_bus(&bus_config, &i80_bus));
6867

components/lcd/esp_lcd_st7796/include/esp_lcd_st7796.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -97,7 +97,7 @@ esp_err_t esp_lcd_new_panel_st7796(const esp_lcd_panel_io_handle_t io, const esp
9797
.bus_width = data_width, \
9898
.max_transfer_bytes = max_trans_bytes, \
9999
}
100-
#else
100+
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
101101
#define ST7796_PANEL_BUS_I80_CONFIG(max_trans_bytes, data_width, dc, wr, d0, d1, d2, d3, d4, \
102102
d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15) \
103103
{ \
@@ -112,6 +112,20 @@ esp_err_t esp_lcd_new_panel_st7796(const esp_lcd_panel_io_handle_t io, const esp
112112
.psram_trans_align = 64, \
113113
.sram_trans_align = 4, \
114114
}
115+
#else
116+
#define ST7796_PANEL_BUS_I80_CONFIG(max_trans_bytes, data_width, dc, wr, d0, d1, d2, d3, d4, \
117+
d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15) \
118+
{ \
119+
.clk_src = LCD_CLK_SRC_PLL160M, \
120+
.dc_gpio_num = dc, \
121+
.wr_gpio_num = wr, \
122+
.data_gpio_nums = { \
123+
d0, d1, d2, d3, d4, d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15 \
124+
}, \
125+
.bus_width = data_width, \
126+
.max_transfer_bytes = max_trans_bytes, \
127+
.dma_burst_size = 64, \
128+
}
115129
#endif
116130

117131
/**

0 commit comments

Comments
 (0)