lcd: driver support for esp32h2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
|
||||
This test app is used to test LCDs with I2C interface.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||
|
||||
This test app is used to test LCDs with SPI interface.
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -12,6 +14,14 @@ extern "C" {
|
||||
#define TEST_LCD_H_RES 240
|
||||
#define TEST_LCD_V_RES 280
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32H2
|
||||
#define TEST_LCD_BK_LIGHT_GPIO 10
|
||||
#define TEST_LCD_RST_GPIO 5
|
||||
#define TEST_LCD_CS_GPIO 3
|
||||
#define TEST_LCD_DC_GPIO 4
|
||||
#define TEST_LCD_PCLK_GPIO 2
|
||||
#define TEST_LCD_DATA0_GPIO 1
|
||||
#else
|
||||
#define TEST_LCD_BK_LIGHT_GPIO 18
|
||||
#define TEST_LCD_RST_GPIO 5
|
||||
#define TEST_LCD_CS_GPIO 0
|
||||
@@ -25,6 +35,7 @@ extern "C" {
|
||||
#define TEST_LCD_DATA5_GPIO 11
|
||||
#define TEST_LCD_DATA6_GPIO 12
|
||||
#define TEST_LCD_DATA7_GPIO 13
|
||||
#endif
|
||||
|
||||
#define TEST_LCD_PIXEL_CLOCK_HZ (20 * 1000 * 1000)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -37,6 +37,7 @@ void test_spi_lcd_common_initialize(esp_lcd_panel_io_handle_t *io_handle, esp_lc
|
||||
.quadhd_io_num = -1,
|
||||
.max_transfer_sz = TEST_LCD_H_RES * TEST_LCD_V_RES * sizeof(uint16_t)
|
||||
};
|
||||
#if SOC_SPI_SUPPORT_OCT
|
||||
if (oct_mode) {
|
||||
buscfg.data1_io_num = TEST_LCD_DATA1_GPIO;
|
||||
buscfg.data2_io_num = TEST_LCD_DATA2_GPIO;
|
||||
@@ -47,6 +48,7 @@ void test_spi_lcd_common_initialize(esp_lcd_panel_io_handle_t *io_handle, esp_lc
|
||||
buscfg.data7_io_num = TEST_LCD_DATA7_GPIO;
|
||||
buscfg.flags = SPICOMMON_BUSFLAG_OCTAL;
|
||||
}
|
||||
#endif
|
||||
TEST_ESP_OK(spi_bus_initialize(TEST_SPI_HOST_ID, &buscfg, SPI_DMA_CH_AUTO));
|
||||
|
||||
esp_lcd_panel_io_spi_config_t io_config = {
|
||||
@@ -60,10 +62,12 @@ void test_spi_lcd_common_initialize(esp_lcd_panel_io_handle_t *io_handle, esp_lc
|
||||
.on_color_trans_done = on_color_trans_done,
|
||||
.user_ctx = user_data,
|
||||
};
|
||||
#if SOC_SPI_SUPPORT_OCT
|
||||
if (oct_mode) {
|
||||
io_config.flags.octal_mode = 1;
|
||||
io_config.spi_mode = 3;
|
||||
}
|
||||
#endif
|
||||
TEST_ESP_OK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)TEST_SPI_HOST_ID, &io_config, io_handle));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user