Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_lcd_sdkconfig_warnning' into 'master'
Browse files Browse the repository at this point in the history
lcd: fix build sdkconfig warning

See merge request ae_group/esp-iot-solution!916
  • Loading branch information
leeebo committed Dec 18, 2023
2 parents 91beb1d + 57f6767 commit 61b73a6
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 65 deletions.
17 changes: 9 additions & 8 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ build_example_display_lcd_qspi_with_ram:
- .rules:build:example_display_lcd_qspi_with_ram
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:release-v5.1
variables:
EXAMPLE_DIR: examples/display/lcd/qspi_with_ram

Expand All @@ -201,7 +201,7 @@ build_example_display_lcd_qspi_without_ram:
- .rules:build:example_display_lcd_qspi_without_ram
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:v5.1.2
before_script:
- export PATCH_PATH=${IOT_SOLUTION_PATH}/examples/display/lcd/qspi_without_ram/patch/support_qspi_without_ram_a9349f4ad4.patch
- cd "$(dirname $(whereis idf.py | awk -F ' ' '{print $2}'))/.."
Expand Down Expand Up @@ -457,7 +457,6 @@ build_example_usb_host_usb_camera_lcd_display:
- .rules:build:example_usb_host_usb_camera_lcd_display
parallel:
matrix:
- IMAGE: espressif/idf:release-v5.0
- IMAGE: espressif/idf:release-v5.1
EXAMPLE_CONFIG: "sdkconfig.psram_octal_120m=default"
variables:
Expand Down Expand Up @@ -527,7 +526,7 @@ build_components_display_lcd_esp_lcd_gc9b71_test_apps:
- .rules:build:components_display_lcd_esp_lcd_gc9b71_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:release-v5.1
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_gc9b71/test_apps

Expand Down Expand Up @@ -559,7 +558,7 @@ build_components_display_lcd_esp_lcd_sh8601_test_apps:
- .rules:build:components_display_lcd_esp_lcd_sh8601_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:release-v5.1
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_sh8601/test_apps

Expand All @@ -569,7 +568,7 @@ build_components_display_lcd_esp_lcd_spd2010_test_apps:
- .rules:build:components_display_lcd_esp_lcd_spd2010_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:release-v5.1
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_spd2010/test_apps

Expand All @@ -579,7 +578,7 @@ build_components_display_lcd_esp_lcd_st7701_test_apps:
- .rules:build:components_display_lcd_esp_lcd_st7701_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:latest
- IMAGE: espressif/idf:release-v5.1
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_st7701/test_apps

Expand Down Expand Up @@ -679,7 +678,9 @@ build_components_openai_test_apps:
- .rules:build:components_openai_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:release-v4.4
# TODO: Replace v4.4.6 with release/v4.4 when the bug is fixed.
- IMAGE: espressif/idf:v4.4.6 # Due to a bug in the ESP32-S3 not being able to scan for AP in release/v4.4,
# temporarily using version v4.4.6 and awaiting the next update in release/v4.4.
- IMAGE: espressif/idf:release-v5.0
variables:
EXAMPLE_DIR: components/openai/test_apps
Expand Down
59 changes: 31 additions & 28 deletions .gitlab/ci/target_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ components_test_esp_lcd_gc9b71:
needs:
- job: "build_components_display_lcd_esp_lcd_gc9b71_test_apps"
artifacts: true
optional: true
optional: false
parallel:
matrix:
- IDF_VERSION: "5.2"
- IDF_VERSION: "5.1"
tags:
- esp32s3
- esp32s3_lcd_ev
Expand All @@ -318,7 +318,7 @@ components_test_esp_lcd_panel_io_additions:
needs:
- job: "build_components_display_lcd_esp_lcd_panel_io_additions_test_apps"
artifacts: true
optional: true
optional: false
parallel:
matrix:
- IDF_VERSION: "4.4"
Expand All @@ -339,10 +339,10 @@ components_test_esp_lcd_sh8601:
needs:
- job: "build_components_display_lcd_esp_lcd_sh8601_test_apps"
artifacts: true
optional: true
optional: false
parallel:
matrix:
- IDF_VERSION: "5.2"
- IDF_VERSION: "5.1"
tags:
- esp32s3
- esp32s3_lcd_ev
Expand All @@ -359,10 +359,10 @@ components_test_esp_lcd_spd2010:
needs:
- job: "build_components_display_lcd_esp_lcd_spd2010_test_apps"
artifacts: true
optional: true
optional: false
parallel:
matrix:
- IDF_VERSION: "5.2"
- IDF_VERSION: "5.1"
tags:
- esp32s3
- esp32s3_lcd_ev
Expand All @@ -379,10 +379,10 @@ components_test_esp_lcd_st7701:
needs:
- job: "build_components_display_lcd_esp_lcd_st7701_test_apps"
artifacts: true
optional: true
optional: false
parallel:
matrix:
- IDF_VERSION: "5.2"
- IDF_VERSION: "5.1"
tags:
- esp32s3
- esp32s3_lcd_ev
Expand All @@ -392,25 +392,26 @@ components_test_esp_lcd_st7701:
TEST_FOLDER: components/display/lcd/esp_lcd_st7701
TEST_ENV: esp32_s3_lcd_ev_board

components_test_esp_lcd_st77903:
extends:
- .pytest_template
- .rules:build:components_display_lcd_esp_lcd_st77903_test_apps
needs:
- job: "build_components_display_lcd_esp_lcd_st77903_test_apps"
artifacts: true
optional: true
parallel:
matrix:
- IDF_VERSION: "5.2"
tags:
- esp32s3
- esp32s3_lcd_ev
image: $DOCKER_TARGET_TEST_v5_1_ENV_IMAGE
variables:
TEST_TARGET: esp32s3
TEST_FOLDER: components/display/lcd/esp_lcd_st77903
TEST_ENV: esp32_s3_lcd_ev_board
# Diable due to lack IDF release-v5.2 docker
# components_test_esp_lcd_st77903:
# extends:
# - .pytest_template
# - .rules:build:components_display_lcd_esp_lcd_st77903_test_apps
# needs:
# - job: "build_components_display_lcd_esp_lcd_st77903_test_apps"
# artifacts: true
# optional: false
# parallel:
# matrix:
# - IDF_VERSION: "5.2"
# tags:
# - esp32s3
# - esp32s3_lcd_ev
# image: $DOCKER_TARGET_TEST_v5_1_ENV_IMAGE
# variables:
# TEST_TARGET: esp32s3
# TEST_FOLDER: components/display/lcd/esp_lcd_st77903
# TEST_ENV: esp32_s3_lcd_ev_board

components_led_lightbulb_driver_test:
extends:
Expand All @@ -436,10 +437,12 @@ components_led_lightbulb_driver_test:
IDF_VERSION: "5.1"
tags:
- ${IDF_TARGET}
- generic
image: $DOCKER_TARGET_TEST_v5_1_ENV_IMAGE
variables:
TEST_TARGET: ${IDF_TARGET}
TEST_FOLDER: components/led/lightbulb_driver
TEST_ENV: generic

example_lighting_lightbulb:
extends:
Expand Down
7 changes: 4 additions & 3 deletions components/.build-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ components/display/lcd/esp_lcd_st7701/test_apps:
enable:
- if: IDF_TARGET in ["esp32s3"]

components/display/lcd/esp_lcd_st77903/test_apps:
enable:
- if: IDF_TARGET in ["esp32s3"]
components/display/lcd/esp_lcd_st77903:
disable:
- if: INCLUDE_DEFAULT == 1
reason: lack IDF release-v5.2 docker

components/display/lcd/esp_lcd_st77916/test_apps:
enable:
Expand Down
6 changes: 6 additions & 0 deletions components/display/lcd/esp_lcd_st77916/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@

* Implement the driver for the ST77916 LCD controller
* Support SPI and QSPI interface

## v0.0.2 - 2023-12-15

### Enhancements:

* Fix issues of QSPI interface
14 changes: 7 additions & 7 deletions components/display/lcd/esp_lcd_st77916/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESP LCD ST77916

[![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_ST77916/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_st77916)
[![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_st77916/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_st77916)

Implementation of the ST77916 LCD controller with [esp_lcd](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/lcd.html) component.

Expand Down Expand Up @@ -39,10 +39,10 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
*/
// static const ST77916_lcd_init_cmd_t lcd_init_cmds[] = {
// // {cmd, { data }, data_size, delay_ms}
// {0x44, (uint8_t []){0x00, 0xc8}, 2, 0},
// {0x35, (uint8_t []){0x00}, 0, 0},
// {0x53, (uint8_t []){0x20}, 1, 25},
// {0x29, (uint8_t []){0x00}, 0, 120},
// {0xF0, (uint8_t []){0x08}, 1, 0},
// {0xF2, (uint8_t []){0x08}, 1, 0},
// {0x9B, (uint8_t []){0x51}, 1, 0},
// {0x86, (uint8_t []){0x53}, 1, 0},
// ...
// };

Expand Down Expand Up @@ -107,13 +107,13 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
};
const esp_lcd_panel_dev_config_t panel_config = {
.reset_gpio_num = EXAMPLE_PIN_NUM_LCD_RST,
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB, // Implemented by LCD command `36h`
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB, // Implemented by LCD command `36h`
.bits_per_pixel = EXAMPLE_LCD_BIT_PER_PIXEL, // Implemented by LCD command `3Ah` (16/18)
.vendor_config = &vendor_config,
};
ESP_ERROR_CHECK(esp_lcd_new_panel_st77916(io_handle, &panel_config, &panel_handle));
esp_lcd_panel_reset(panel_handle);s
esp_lcd_panel_reset(panel_handle);
esp_lcd_panel_init(panel_handle);
esp_lcd_panel_disp_on_off(panel_handle, true);
```
17 changes: 6 additions & 11 deletions components/display/lcd/esp_lcd_st77916/esp_lcd_st77916.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
#define LCD_OPCODE_READ_CMD (0x0BULL)
#define LCD_OPCODE_WRITE_COLOR (0x32ULL)

#define ST77916_CMD_SET (0xFF)
#define ST77916_CMD_SET_BYTE0 (0x20)
#define ST77916_CMD_SET_BYTE1 (0x10)
#define ST77916_CMD_SET_USER (0x00)
#define ST77916_CMD_SET (0xF0)
#define ST77916_PARAM_SET (0x00)

static const char *TAG = "st77916";

Expand Down Expand Up @@ -225,7 +223,7 @@ static const st77916_lcd_init_cmd_t vendor_specific_init_default[] = {
{0xD0, (uint8_t []){0x91}, 1, 0},
{0xD1, (uint8_t []){0x68}, 1, 0},
{0xD2, (uint8_t []){0x69}, 1, 0},
{0xF5, (uint8_t []){0x00, 0xA5}, 1, 0},
{0xF5, (uint8_t []){0x00, 0xA5}, 2, 0},
{0xDD, (uint8_t []){0x35}, 1, 0},
{0xDE, (uint8_t []){0x35}, 1, 0},
{0xF1, (uint8_t []){0x10}, 1, 0},
Expand Down Expand Up @@ -417,9 +415,6 @@ static esp_err_t panel_st77916_init(esp_lcd_panel_t *panel)
bool is_user_set = true;
bool is_cmd_overwritten = false;

ESP_RETURN_ON_ERROR(tx_param(st77916, io, ST77916_CMD_SET, (uint8_t[]) {
ST77916_CMD_SET_BYTE0, ST77916_CMD_SET_BYTE1, ST77916_CMD_SET_USER
}, 3), TAG, "send command failed");
ESP_RETURN_ON_ERROR(tx_param(st77916, io, LCD_CMD_MADCTL, (uint8_t[]) {
st77916->madctl_val,
}, 1), TAG, "send command failed");
Expand Down Expand Up @@ -461,12 +456,12 @@ static esp_err_t panel_st77916_init(esp_lcd_panel_t *panel)
}

// Send command
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, init_cmds[i].cmd, init_cmds[i].data, init_cmds[i].data_bytes), TAG, "send command failed");
ESP_RETURN_ON_ERROR(tx_param(st77916, io, init_cmds[i].cmd, init_cmds[i].data, init_cmds[i].data_bytes), TAG, "send command failed");
vTaskDelay(pdMS_TO_TICKS(init_cmds[i].delay_ms));

// Check if the current cmd is the "command set" cmd
if ((init_cmds[i].cmd == ST77916_CMD_SET) && (init_cmds[i].data_bytes > 2)) {
is_user_set = (((uint8_t *)init_cmds[i].data)[2] == ST77916_CMD_SET_USER);
if ((init_cmds[i].cmd == ST77916_CMD_SET)) {
is_user_set = ((uint8_t *)init_cmds[i].data)[0] == ST77916_PARAM_SET ? true : false;
}
}
ESP_LOGD(TAG, "send init commands success");
Expand Down
2 changes: 1 addition & 1 deletion components/display/lcd/esp_lcd_st77916/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.0.1"
version: "0.0.2"
description: ESP LCD ST77916
url: https://github.com/espressif/esp-iot-solution/tree/master/components/display/lcd/esp_lcd_st77916
repository: https://github.com/espressif/esp-iot-solution.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
#define TEST_LCD_V_RES (360)
#define TEST_LCD_BIT_PER_PIXEL (16)

#define TEST_PIN_NUM_LCD_CS (GPIO_NUM_4)
#define TEST_PIN_NUM_LCD_PCLK (GPIO_NUM_18)
#define TEST_PIN_NUM_LCD_DATA0 (GPIO_NUM_19)
#define TEST_PIN_NUM_LCD_CS (GPIO_NUM_9)
#define TEST_PIN_NUM_LCD_PCLK (GPIO_NUM_10)
#define TEST_PIN_NUM_LCD_DATA0 (GPIO_NUM_11)
#define TEST_PIN_NUM_LCD_DATA1 (GPIO_NUM_12)
#define TEST_PIN_NUM_LCD_DATA2 (GPIO_NUM_13)
#define TEST_PIN_NUM_LCD_DATA3 (GPIO_NUM_14)
#define TEST_PIN_NUM_LCD_RST (GPIO_NUM_3)
#define TEST_PIN_NUM_LCD_DC (GPIO_NUM_5)
#define TEST_PIN_NUM_LCD_RST (GPIO_NUM_17)
#define TEST_PIN_NUM_LCD_DC (GPIO_NUM_8)

#define TEST_DELAY_TIME_MS (3000)

Expand Down
6 changes: 4 additions & 2 deletions examples/display/lcd/qspi_without_ram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ This example uses the [esp_timer](https://docs.espressif.com/projects/esp-idf/en

The ST77903 driver relies on some new features that have not yet been merged into `ESP-IDF`. To successfully compile the example, please follow the steps to apply the patch:

1. Go to the root folder of ESP-IDF, run the following commands and swtich to the commit **a9349f4ad4**. If the commit can't be switched, please update the `master` branch.
1. Get the `release/v5.2` or `master` branch of ESP-IDF.

2. Go to the root folder of ESP-IDF, run the following commands and swtich to the commit **a9349f4ad4**. If the commit can't be switched, please update the branch.

```bash
git checkout --recurse-submodules a9349f4ad4
git submodule update --init --recursive
```

2. Run the command `git apply <path_of_patch>/support_qspi_without_ram_a9349f4ad4.patch` to apply the [patch](patch/support_qspi_without_ram_a9349f4ad4.patch).
3. Run the command `git apply <path_of_patch>/support_qspi_without_ram_a9349f4ad4.patch` to apply the [patch](patch/support_qspi_without_ram_a9349f4ad4.patch).

### Hardware Required

Expand Down

0 comments on commit 61b73a6

Please sign in to comment.