Update to 2.0.0
This commit is contained in:
@@ -1 +1 @@
|
||||
00ab2872c56a4037e6d1efda104ef0da00c5296865f8f938cc7cc2fc3e99f962
|
||||
9e165065cf25b4575dd9f587440ad22aa94d011359d55a97fc39bb691a9fc0cd
|
||||
@@ -1 +1 @@
|
||||
{"version": "1.0", "algorithm": "sha256", "created_at": "2025-05-21T15:56:53.722942+00:00", "files": [{"path": "CMakeLists.txt", "size": 456, "hash": "581b434233fe10f4ae03f48fe4ffcdc76e66027fbe744a663cb997910f492b4c"}, {"path": "idf_component.yml", "size": 419, "hash": "ad43d718c731c9544afc1212c7cdfa2a191b20ace26432a16834b0103d99023e"}, {"path": "esp_lcd_st7796_mipi.c", "size": 10806, "hash": "d072e86ab67b328e1377b5bfbb303273d4908c2fb3b6143ce10e5ed06eb01671"}, {"path": "esp_lcd_st7796.c", "size": 1238, "hash": "03c742b629f27d38a94cd3aa8a157195b9a9f8cc57618d30e96ecc3545b07b98"}, {"path": "README.md", "size": 6349, "hash": "bea9ce10526e7d6ad31f0ae522be18ecdd21275ff9935d3d5d86946f3da605da"}, {"path": "esp_lcd_st7796_general.c", "size": 13051, "hash": "d4b50de091a25cb3c001ed903d0178c6fc76d2705ea87daa11fe245a93592447"}, {"path": "license.txt", "size": 11358, "hash": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"}, {"path": "include/esp_lcd_st7796.h", "size": 9569, "hash": "25837296fe53c0a3a6dbb7e80dae24a97cbf266abbae762264a000f1b245a7e2"}, {"path": "test_apps/CMakeLists.txt", "size": 316, "hash": "bb5058dad04df955f82c042f32ea8b9a5434a54104caa0f01b2929741a24f0e5"}, {"path": "test_apps/sdkconfig.defaults", "size": 353, "hash": "296f4a3a607c38d36f5d9405c3fc968a1a495447f762753f007b212b0d21fbb7"}, {"path": "priv_include/esp_lcd_st7796_interface.h", "size": 1275, "hash": "3dcf1fc8902350f3d7e172cfb956431047121a011f0e35f86fd22437a675a66b"}, {"path": "test_apps/main/test_esp_lcd_st7796_general.c", "size": 5226, "hash": "b1027efe0ff375cfe33452525160d645fd4f83887235d3590dedc06eddf0f533"}, {"path": "test_apps/main/CMakeLists.txt", "size": 113, "hash": "5b20a48123d65be888744cb5c81ce67aab07572469268b9daf97e7d8177918f0"}, {"path": "test_apps/main/idf_component.yml", "size": 148, "hash": "2c9d76d9b5cf309b56ac449dfb787fadc3b3bd9debd7c941f2e75b413e7eae04"}, {"path": "test_apps/main/test_esp_lcd_st7796_mipi.c", "size": 7985, "hash": "b76a27bec8fd126f51a5a60729e62d7e703d2e644da721a35ca0637420c64e2c"}, {"path": "test_apps/main/test_app_main.c", "size": 1499, "hash": "c1525b7878c26e6700e6e992037a132a18b8d5ac6a9006d80c245d039815c7b0"}]}
|
||||
{"version": "1.0", "algorithm": "sha256", "created_at": "2025-08-26T09:58:45.372697+00:00", "files": [{"path": "CMakeLists.txt", "size": 456, "hash": "581b434233fe10f4ae03f48fe4ffcdc76e66027fbe744a663cb997910f492b4c"}, {"path": "README.md", "size": 6088, "hash": "13d7a64f75cbac9c0ab647ec91e1c90d5c8fb7c2842c7fedca2e92bcce032110"}, {"path": "esp_lcd_st7796.c", "size": 1238, "hash": "03c742b629f27d38a94cd3aa8a157195b9a9f8cc57618d30e96ecc3545b07b98"}, {"path": "esp_lcd_st7796_general.c", "size": 13466, "hash": "dc67f5511567c20ca48ef1190a680504efb2653dfc14ad8312e9d7288cb6a440"}, {"path": "esp_lcd_st7796_mipi.c", "size": 11624, "hash": "844bd3958fa078a9fadbd9ffe12a766296f4f895f4ac0ff19aa62bfc0b96f44f"}, {"path": "idf_component.yml", "size": 419, "hash": "916ce7401966adbae5bd2b9a895c0290373c359d7ff73e5b5c4f896b09d93356"}, {"path": "license.txt", "size": 11358, "hash": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"}, {"path": "include/esp_lcd_st7796.h", "size": 10809, "hash": "f27197e0c05577badc107428edbbd0145481dbcfa74dda0c96d0d6d5b3c1abd8"}, {"path": "priv_include/esp_lcd_st7796_interface.h", "size": 1275, "hash": "3dcf1fc8902350f3d7e172cfb956431047121a011f0e35f86fd22437a675a66b"}, {"path": "test_apps/CMakeLists.txt", "size": 263, "hash": "a44782cc239c58b39146a1fd9fbd40d952417ca0dcbcc34056d0f7af208024c6"}, {"path": "test_apps/sdkconfig.defaults", "size": 353, "hash": "296f4a3a607c38d36f5d9405c3fc968a1a495447f762753f007b212b0d21fbb7"}, {"path": "test_apps/main/CMakeLists.txt", "size": 159, "hash": "c7883535398f0b3c534d0fa2f98041d1b2fec5b098af36040af790222464c13d"}, {"path": "test_apps/main/idf_component.yml", "size": 148, "hash": "2c9d76d9b5cf309b56ac449dfb787fadc3b3bd9debd7c941f2e75b413e7eae04"}, {"path": "test_apps/main/test_app_main.c", "size": 1499, "hash": "c1525b7878c26e6700e6e992037a132a18b8d5ac6a9006d80c245d039815c7b0"}, {"path": "test_apps/main/test_esp_lcd_st7796_general.c", "size": 5331, "hash": "cf1e7ff95eecf164d402713bfb3380d7d5d3b8d21c2d3d58e8a088c7b9b3aeeb"}, {"path": "test_apps/main/test_esp_lcd_st7796_mipi.c", "size": 7985, "hash": "b76a27bec8fd126f51a5a60729e62d7e703d2e644da721a35ca0637420c64e2c"}]}
|
||||
@@ -14,7 +14,7 @@ Packages from this repository are uploaded to [Espressif's component service](ht
|
||||
You can add them to your project via `idf.py add-dependency`, e.g.
|
||||
|
||||
```bash
|
||||
compote manifest add-dependency espressif/esp_lcd_st7796==1.0.0
|
||||
idf.py add-dependency "espressif/esp_lcd_st7796^1.3.0"
|
||||
```
|
||||
|
||||
Alternatively, you can create `idf_component.yml`. More is in [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html).
|
||||
@@ -59,23 +59,15 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
|
||||
// .init_cmds_size = sizeof(lcd_init_cmds) / sizeof(st7796_lcd_init_cmd_t),
|
||||
// };
|
||||
const esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = EXAMPLE_PIN_NUM_LCD_RST, // Set to -1 if not use
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) // Implemented by LCD command `36h`
|
||||
.color_space = ESP_LCD_COLOR_SPACE_RGB,
|
||||
#else
|
||||
.rgb_endian = LCD_RGB_ENDIAN_RGB,
|
||||
#endif
|
||||
.bits_per_pixel = EXAMPLE_LCD_BIT_PER_PIXEL, // Implemented by LCD command `3Ah` (16/18/24)
|
||||
// .vendor_config = &vendor_config, // Uncomment this line if use custom initialization commands
|
||||
.reset_gpio_num = EXAMPLE_PIN_NUM_LCD_RST, // Set to -1 if not use
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB, // RGB element order: R-G-B
|
||||
.bits_per_pixel = EXAMPLE_LCD_BIT_PER_PIXEL, // Implemented by LCD command `3Ah` (16/18/24)
|
||||
// .vendor_config = &vendor_config, // Uncomment this line if use custom initialization commands
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_st7796(io_handle, &panel_config, &panel_handle));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_disp_off(panel_handle, false));
|
||||
#else
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(panel_handle, true));
|
||||
#endif
|
||||
```
|
||||
|
||||
### MIPI Interface
|
||||
|
||||
@@ -74,7 +74,7 @@ esp_err_t esp_lcd_new_panel_st7796_general(const esp_lcd_panel_io_handle_t io, c
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
|
||||
break;
|
||||
}
|
||||
#else
|
||||
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
switch (panel_dev_config->rgb_endian) {
|
||||
case LCD_RGB_ENDIAN_RGB:
|
||||
st7796->madctl_val = 0;
|
||||
@@ -86,6 +86,18 @@ esp_err_t esp_lcd_new_panel_st7796_general(const esp_lcd_panel_io_handle_t io, c
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb endian");
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch (panel_dev_config->rgb_ele_order) {
|
||||
case LCD_RGB_ELEMENT_ORDER_RGB:
|
||||
st7796->madctl_val = 0;
|
||||
break;
|
||||
case LCD_RGB_ELEMENT_ORDER_BGR:
|
||||
st7796->madctl_val |= LCD_CMD_BGR_BIT;
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb element order");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (panel_dev_config->bits_per_pixel) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -65,7 +65,32 @@ esp_err_t esp_lcd_new_panel_st7796_mipi(const esp_lcd_panel_io_handle_t io, cons
|
||||
ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed");
|
||||
}
|
||||
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
switch (panel_dev_config->color_space) {
|
||||
case ESP_LCD_COLOR_SPACE_RGB:
|
||||
st7796->madctl_val = 0;
|
||||
break;
|
||||
case ESP_LCD_COLOR_SPACE_BGR:
|
||||
st7796->madctl_val |= LCD_CMD_BGR_BIT;
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
|
||||
break;
|
||||
}
|
||||
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
switch (panel_dev_config->rgb_endian) {
|
||||
case LCD_RGB_ENDIAN_RGB:
|
||||
st7796->madctl_val = 0;
|
||||
break;
|
||||
case LCD_RGB_ENDIAN_BGR:
|
||||
st7796->madctl_val |= LCD_CMD_BGR_BIT;
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb endian");
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch (panel_dev_config->rgb_ele_order) {
|
||||
case LCD_RGB_ELEMENT_ORDER_RGB:
|
||||
st7796->madctl_val = 0;
|
||||
break;
|
||||
@@ -73,9 +98,10 @@ esp_err_t esp_lcd_new_panel_st7796_mipi(const esp_lcd_panel_io_handle_t io, cons
|
||||
st7796->madctl_val |= LCD_CMD_BGR_BIT;
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported color space");
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb element order");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (panel_dev_config->bits_per_pixel) {
|
||||
case 16: // RGB565
|
||||
|
||||
@@ -4,7 +4,7 @@ dependencies:
|
||||
description: ESP LCD ST7796 driver (SPI && I80 && MIPI DSI)
|
||||
repository: git://github.com/espressif/esp-bsp.git
|
||||
repository_info:
|
||||
commit_sha: 7e5759a5dcae75624e0c7abb8d8aef6b95e33b1f
|
||||
commit_sha: ca6290a9e2d65aa43af6297c9646cce09103f7be
|
||||
path: components/lcd/esp_lcd_st7796
|
||||
targets:
|
||||
- esp32
|
||||
@@ -12,4 +12,4 @@ targets:
|
||||
- esp32s3
|
||||
- esp32p4
|
||||
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd/esp_lcd_st7796
|
||||
version: 1.3.2
|
||||
version: 1.3.4
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ esp_err_t esp_lcd_new_panel_st7796(const esp_lcd_panel_io_handle_t io, const esp
|
||||
.bus_width = data_width, \
|
||||
.max_transfer_bytes = max_trans_bytes, \
|
||||
}
|
||||
#else
|
||||
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
|
||||
#define ST7796_PANEL_BUS_I80_CONFIG(max_trans_bytes, data_width, dc, wr, d0, d1, d2, d3, d4, \
|
||||
d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15) \
|
||||
{ \
|
||||
@@ -112,6 +112,20 @@ esp_err_t esp_lcd_new_panel_st7796(const esp_lcd_panel_io_handle_t io, const esp
|
||||
.psram_trans_align = 64, \
|
||||
.sram_trans_align = 4, \
|
||||
}
|
||||
#else
|
||||
#define ST7796_PANEL_BUS_I80_CONFIG(max_trans_bytes, data_width, dc, wr, d0, d1, d2, d3, d4, \
|
||||
d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15) \
|
||||
{ \
|
||||
.clk_src = LCD_CLK_SRC_PLL160M, \
|
||||
.dc_gpio_num = dc, \
|
||||
.wr_gpio_num = wr, \
|
||||
.data_gpio_nums = { \
|
||||
d0, d1, d2, d3, d4, d5, d6, d7, d8 , d9, d10, d11, d12, d13, d14, d15 \
|
||||
}, \
|
||||
.bus_width = data_width, \
|
||||
.max_transfer_bytes = max_trans_bytes, \
|
||||
.dma_burst_size = 64, \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The following lines of boilerplate have to be in your project's CMakeLists
|
||||
# in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(test_esp_lcd_st7796)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
INCLUDE_DIRS "."
|
||||
WHOLE_ARCHIVE)
|
||||
REQUIRES unity driver
|
||||
WHOLE_ARCHIVE)
|
||||
|
||||
@@ -110,8 +110,10 @@ TEST_CASE("test st7796 to draw color bar with I80 interface", "[st7796][i80]")
|
||||
.reset_gpio_num = TEST_PIN_NUM_LCD_RST,
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
.color_space = ESP_LCD_COLOR_SPACE_BGR,
|
||||
#else
|
||||
#elif ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
.rgb_endian = LCD_RGB_ENDIAN_BGR,
|
||||
#else
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
|
||||
#endif
|
||||
.bits_per_pixel = TEST_LCD_BIT_PER_PIXEL,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user