Skip to content

Commit e6a0e6d

Browse files
wip
1 parent 07f41ae commit e6a0e6d

File tree

10 files changed

+54
-21
lines changed

10 files changed

+54
-21
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ esp_err_t bsp_display_new(const bsp_display_config_t *config, esp_lcd_panel_hand
117117
};
118118
esp_lcd_panel_dev_config_t panel_config = {
119119
.reset_gpio_num = BSP_LCD_RST,
120-
.color_space = ESP_LCD_COLOR_SPACE_RGB,
120+
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
121121
.bits_per_pixel = 16,
122122
.vendor_config = (void *) &vendor_config,
123123
};

bsp/esp32_c3_lcdkit/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
public: true
2222

2323
esp_lcd_gc9a01:
24-
version: "^1"
24+
version: "^2.0.3"
2525
public: true
2626

2727
button:

components/esp_lvgl_port/examples/touchscreen/main/main.c

Lines changed: 6 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
*/
@@ -26,7 +26,6 @@
2626
#define EXAMPLE_LCD_PIXEL_CLK_HZ (40 * 1000 * 1000)
2727
#define EXAMPLE_LCD_CMD_BITS (8)
2828
#define EXAMPLE_LCD_PARAM_BITS (8)
29-
#define EXAMPLE_LCD_COLOR_SPACE (ESP_LCD_COLOR_SPACE_BGR)
3029
#define EXAMPLE_LCD_BITS_PER_PIXEL (16)
3130
#define EXAMPLE_LCD_DRAW_BUFF_DOUBLE (1)
3231
#define EXAMPLE_LCD_DRAW_BUFF_HEIGHT (50)
@@ -101,7 +100,11 @@ static esp_err_t app_lcd_init(void)
101100
ESP_LOGD(TAG, "Install LCD driver");
102101
const esp_lcd_panel_dev_config_t panel_config = {
103102
.reset_gpio_num = EXAMPLE_LCD_GPIO_RST,
104-
.color_space = EXAMPLE_LCD_COLOR_SPACE,
103+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
104+
.rgb_endian = LCD_RGB_ENDIAN_BGR,
105+
#else
106+
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
107+
#endif
105108
.bits_per_pixel = EXAMPLE_LCD_BITS_PER_PIXEL,
106109
};
107110
ESP_GOTO_ON_ERROR(esp_lcd_new_panel_st7789(lcd_io, &panel_config, &lcd_panel), err, TAG, "New panel failed");

components/esp_lvgl_port/test_apps/lvgl_port/main/test.c

Lines changed: 6 additions & 3 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: CC0-1.0
55
*/
@@ -29,7 +29,6 @@
2929
#define EXAMPLE_LCD_PIXEL_CLK_HZ (40 * 1000 * 1000)
3030
#define EXAMPLE_LCD_CMD_BITS (8)
3131
#define EXAMPLE_LCD_PARAM_BITS (8)
32-
#define EXAMPLE_LCD_COLOR_SPACE (ESP_LCD_COLOR_SPACE_BGR)
3332
#define EXAMPLE_LCD_BITS_PER_PIXEL (16)
3433
#define EXAMPLE_LCD_DRAW_BUFF_DOUBLE (1)
3534
#define EXAMPLE_LCD_DRAW_BUFF_HEIGHT (50)
@@ -102,7 +101,11 @@ static esp_err_t app_lcd_init(void)
102101
ESP_LOGD(TAG, "Install LCD driver");
103102
const esp_lcd_panel_dev_config_t panel_config = {
104103
.reset_gpio_num = EXAMPLE_LCD_GPIO_RST,
105-
.color_space = EXAMPLE_LCD_COLOR_SPACE,
104+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
105+
.rgb_endian = LCD_RGB_ENDIAN_BGR,
106+
#else
107+
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
108+
#endif
106109
.bits_per_pixel = EXAMPLE_LCD_BITS_PER_PIXEL,
107110
};
108111
ESP_GOTO_ON_ERROR(esp_lcd_new_panel_st7789(lcd_io, &panel_config, &lcd_panel), err, TAG, "New panel failed");

components/lcd/esp_lcd_ra8875/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const esp_lcd_panel_ra8875_config_t vendor_config = {
9494
9595
esp_lcd_panel_dev_config_t panel_config = {
9696
.reset_gpio_num = BOARD_DISP_PARALLEL_RST,
97-
.color_space = ESP_LCD_COLOR_SPACE_RGB,
97+
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
9898
.bits_per_pixel = 16,
9999
.vendor_config = (void*)&vendor_config,
100100
};

components/lcd/esp_lcd_ra8875/esp_lcd_ra8875.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -77,13 +77,14 @@ esp_err_t esp_lcd_new_panel_ra8875(const esp_lcd_panel_io_handle_t io, const esp
7777
}
7878

7979
// The RA8875 supports only RGB endian
80-
// Note: Color space used for compatibility with IDF v4.4
81-
switch (panel_dev_config->color_space) {
82-
case ESP_LCD_COLOR_SPACE_RGB:
83-
break;
84-
default:
80+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
81+
if (panel_dev_config->color_space != ESP_LCD_COLOR_SPACE_RGB) {
82+
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
83+
if (panel_dev_config->rgb_endian != LCD_RGB_ENDIAN_RGB) {
84+
#else
85+
if (panel_dev_config->rgb_ele_order != LCD_RGB_ELEMENT_ORDER_RGB) {
86+
#endif
8587
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
86-
break;
8788
}
8889

8990
switch (panel_dev_config->bits_per_pixel) {

components/lcd/esp_lcd_ra8875/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.0"
1+
version: "1.0.1"
22
description: ESP LCD RA8875
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd/esp_lcd_ra8875
44
dependencies:

components/lcd/esp_lcd_st7796/esp_lcd_st7796_mipi.c

Lines changed: 28 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
*/
@@ -65,17 +65,43 @@ esp_err_t esp_lcd_new_panel_st7796_mipi(const esp_lcd_panel_io_handle_t io, cons
6565
ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed");
6666
}
6767

68+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
6869
switch (panel_dev_config->color_space) {
70+
case ESP_LCD_COLOR_SPACE_RGB:
71+
st7796->madctl_val = 0;
72+
break;
73+
case ESP_LCD_COLOR_SPACE_BGR:
74+
st7796->madctl_val |= LCD_CMD_BGR_BIT;
75+
break;
76+
default:
77+
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
78+
break;
79+
}
80+
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
81+
switch (panel_dev_config->rgb_endian) {
82+
case LCD_RGB_ENDIAN_RGB:
83+
st7796->madctl_val = 0;
84+
break;
85+
case LCD_RGB_ENDIAN_BGR:
86+
st7796->madctl_val |= LCD_CMD_BGR_BIT;
87+
break;
88+
default:
89+
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb endian");
90+
break;
91+
}
92+
#else
93+
switch (panel_dev_config->rgb_ele_order) {
6994
case LCD_RGB_ELEMENT_ORDER_RGB:
7095
st7796->madctl_val = 0;
7196
break;
7297
case LCD_RGB_ELEMENT_ORDER_BGR:
7398
st7796->madctl_val |= LCD_CMD_BGR_BIT;
7499
break;
75100
default:
76-
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
101+
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb element order");
77102
break;
78103
}
104+
#endif
79105

80106
switch (panel_dev_config->bits_per_pixel) {
81107
case 16: // RGB565

components/lcd/esp_lcd_st7796/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.3.3"
1+
version: "1.3.4"
22
targets:
33
- esp32
44
- esp32s2

examples/.build-test-rules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Examples: Always build all
22
examples:
33
disable:
4-
- if: CONFIG_NAME in ["esp-box", "esp-box-lite"]
4+
- if: CONFIG_NAME in ["esp-box", "esp-box-lite", "esp32_azure_iot_kit"]
55
reason: Do not build examples for deprecated BSPs
66
- if: (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 2) and CONFIG_NAME in ["esp_bsp_generic", "esp_bsp_devkit", "m5stack_core"]
77
reason: Example depends on BSP, which is supported only for IDF >= 5.2

0 commit comments

Comments
 (0)