Skip to content

fix(examples): fix lvgl port rotation issue when enabling avoid tearing #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# ChangeLog

## v0.1.5 - 2024-07-01
## v0.1.5 - 2024-07-09

### Enhancements:

* feat(gt911): support set I2C address by using RST and INT pins
* feat(lvgl_port): set the lvgl task to run on the same core as the Arduino task by default
* feat(board): increase the RGB pclk frequency to 26MHz for `ESP32_4848S040C_I_Y_3`

### Bugfixes:

* fix(panel): init expander host with correct macro (#65)
* fix(panel): don't reset the LCD if the bus is RGB bus and the `ESP_PANEL_LCD_FLAGS_AUTO_DEL_PANEL_IO` is enabled
* fix(examples): fix lvgl port rotation issue when enabling avoid tearing by @NecroMancer05

## v0.1.4 - 2024-06-17

Expand Down
30 changes: 16 additions & 14 deletions ESP_Panel_Board_Custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@
#define ESP_PANEL_LCD_MIRROR_Y (0) // 0/1

/* LCD Other Settings */
/* IO num of RESET pin, set to -1 if not use */
#define ESP_PANEL_LCD_IO_RST (-1)
#define ESP_PANEL_LCD_RST_LEVEL (0) // 0: low level, 1: high level
/* Reset pin */
#define ESP_PANEL_LCD_IO_RST (-1) // IO num of RESET pin, set to -1 if not use
#define ESP_PANEL_LCD_RST_LEVEL (0) // Active level. 0: low level, 1: high level

#endif /* ESP_PANEL_USE_LCD */

Expand Down Expand Up @@ -239,8 +239,8 @@
/* Touch panel bus parameters */
#if ESP_PANEL_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C

#define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0
#define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // Typically set to 0 to use default address
#define ESP_PANEL_TOUCH_BUS_HOST_ID (0) // Typically set to 0 to use the default address
#define ESP_PANEL_TOUCH_I2C_ADDRESS (0) // For GT911, there are two addresses: 0x5D(default) and 0x14
#if !ESP_PANEL_TOUCH_BUS_SKIP_INIT_HOST
#define ESP_PANEL_TOUCH_I2C_CLK_HZ (400 * 1000)
// Typically set to 400K
Expand Down Expand Up @@ -274,12 +274,14 @@
#define ESP_PANEL_TOUCH_MIRROR_Y (0) // 0/1

/* Touch Other Settings */
/* IO num of RESET pin, set to -1 if not use */
#define ESP_PANEL_TOUCH_IO_RST (-1)
#define ESP_PANEL_TOUCH_RST_LEVEL (0) // 0: low level, 1: high level
/* IO num of INT pin, set to -1 if not use */
#define ESP_PANEL_TOUCH_IO_INT (-1)
#define ESP_PANEL_TOUCH_INT_LEVEL (0) // 0: low level, 1: high level
/* Reset pin */
#define ESP_PANEL_TOUCH_IO_RST (-1) // IO num of RESET pin, set to -1 if not use
// For GT911, the RST pin is also used to configure the I2C address
#define ESP_PANEL_TOUCH_RST_LEVEL (0) // Active level. 0: low level, 1: high level
/* Interrupt pin */
#define ESP_PANEL_TOUCH_IO_INT (-1) // IO num of INT pin, set to -1 if not use
// For GT911, the INT pin is also used to configure the I2C address
#define ESP_PANEL_TOUCH_INT_LEVEL (0) // Active level. 0: low level, 1: high level

#endif /* ESP_PANEL_USE_TOUCH */

Expand All @@ -288,8 +290,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define ESP_PANEL_USE_BACKLIGHT (0) // 0/1
#if ESP_PANEL_USE_BACKLIGHT
/* IO num of backlight pin */
#define ESP_PANEL_BACKLIGHT_IO (45)
/* Backlight pin */
#define ESP_PANEL_BACKLIGHT_IO (45) // IO num of backlight pin
#define ESP_PANEL_BACKLIGHT_ON_LEVEL (1) // 0: low level, 1: high level

/* Set to 1 if you want to turn off the backlight after initializing the panel; otherwise, set it to turn on */
Expand Down Expand Up @@ -362,7 +364,7 @@
*/
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 0
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 1
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2

#endif /* ESP_PANEL_USE_CUSTOM_BOARD */

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![Arduino Lint](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml) [![pre-commit](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml)
[![GitHub Release](https://img.shields.io/github/v/release/esp-arduino-libs/ESP32_Display_Panel)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/releases) [![Arduino Lint](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml) [![pre-commit](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml)

# ESP Display Panel

* [中文版本](./README_CN.md)

ESP32_Display_Panel is an Arduino library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. Users can develop directly for a variety of [supported development boards](src/board/Board_Instructions.md) or create custom ones through simple adaptation. Additionally, ESP32_Display_Panel is compatible with various LCD and touch drivers, allowing users to develop using standalone drivers as needed.
ESP32_Display_Panel is an Arduino library designed for ESP SoCs to drive display panels and facilitate rapid GUI development. Users can develop directly for a variety of [supported development boards](docs/Board_Instructions.md) or create custom ones through simple adaptation. Additionally, ESP32_Display_Panel is compatible with various LCD and touch drivers, allowing users to develop using standalone drivers as needed.

ESP32_Display_Panel encapsulates various components from the [Espressif Components Registry](https://components.espressif.com/), requiring development based on [arduino-esp32](https://github.com/espressif/arduino-esp32), and can be directly downloaded from the Arduino IDE.

Expand Down Expand Up @@ -58,19 +58,19 @@ The functional block diagram of ESP32_Display_Panel is as follows, mainly compri

### Development Boards

Below is a list of [supported development boards](src/board/Board_Instructions.md):
Below is a list of [supported development boards](docs/Board_Instructions.md):

| **Manufacturer** | **Board Model** |
| --------------- | --------------- |
| [Espressif](src/board/Board_Instructions.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, ESP32-S3-Box-3(beta), ESP32-S3-Box-Lite, ESP32-S3-EYE, ESP32-S3-Korvo-2, ESP32-S3-LCD-EV-Board, ESP32-S3-LCD-EV-Board-2, ESP32-S3-USB-OTG |
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 |
| [Jingcai](src/board/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |
| [Espressif](docs/Board_Instructions.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, ESP32-S3-Box-3(beta), ESP32-S3-Box-Lite, ESP32-S3-EYE, ESP32-S3-Korvo-2, ESP32-S3-LCD-EV-Board, ESP32-S3-LCD-EV-Board-2, ESP32-S3-USB-OTG |
| [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 |
| [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |

Developers and manufacturers are welcomed to contribute PRs to add more development boards. For detailed instructions, please refer to the [`Board Development Guide`](./src/board/Board_Contribution_Guide.md).
Developers and manufacturers are welcomed to contribute PRs to add more development boards. For detailed instructions, please refer to the [`Board Development Guide`](./docs/Board_Contribution_Guide.md).

### LCD Controllers

Below is a list of [supported LCD controllers](src/lcd/README.md):
Below is a list of [supported LCD controllers](docs/LCD_Controllers.md):

| **Manufacturer** | **Model** |
| --------------- | --------- |
Expand All @@ -81,7 +81,7 @@ Below is a list of [supported LCD controllers](src/lcd/README.md):

### Touch Controllers

Below is a list of [supported touch controllers](src/touch/README.md):
Below is a list of [supported touch controllers](docs/Touch_Controllers.md):

| **Manufacturer** | **Model** |
| --------------- | --------- |
Expand Down Expand Up @@ -112,10 +112,10 @@ Below are detailed instructions on how to configure ESP32_Display_Panel, mainly
3. For projects without configuration files, users can copy them from the root directory or examples of ESP32_Display_Panel to their own projects.
4. If multiple projects need to use the same configuration, users can place the configuration files in the [Arduino Library Directory](#where-is-the-directory-for-arduino-libraries), so that all projects can share the same configuration.

**Notes**:

* The same directory can simultaneously contain both `ESP_Panel_Board_Supported.h` and `ESP_Panel_Board_Custom.h` configuration files, but they cannot be enabled at the same time, meaning `ESP_PANEL_USE_SUPPORTED_BOARD` and `ESP_PANEL_USE_CUSTOM_BOARD` can only have one set to `1`.
* If neither of the above two configuration files is enabled, users cannot use the `ESP_Panel` driver and can only use other standalone device drivers, such as `ESP_PanelBus`, `ESP_PanelLcd`, etc.
> [!WARNING]
> * The same directory can simultaneously contain both `ESP_Panel_Board_Supported.h` and `ESP_Panel_Board_Custom.h` configuration files, but they cannot be enabled at the same time, meaning `ESP_PANEL_USE_SUPPORTED_BOARD` and `ESP_PANEL_USE_CUSTOM_BOARD` can only have one set to `1`.
> * If neither of the above two configuration files is enabled, users cannot use the `ESP_Panel` driver and can only use other standalone device drivers, such as `ESP_PanelBus`, `ESP_PanelLcd`, etc.
> * Since the configurations within these files might change, such as adding, deleting, or renaming, to ensure the compatibility of the program, the library manages the versions of these files independently and checks whether the configuration files currently used by the user are compatible with the library during compilation. Detailed version information and checking rules can be found at the end of the file.

#### Configuring Drivers

Expand Down Expand Up @@ -309,7 +309,7 @@ To port the SquareLine project (v1.3.x), please refer to [here](#porting-squarel

### Configuring Supported Development Boards

For details on how to configure the supported development boards in the Arduino IDE, see [Board_Instructions.md](./src/board/Board_Instructions.md#recommended-configurations-in-the-arduino-ide).
For details on how to configure the supported development boards in the Arduino IDE, see [Board_Instructions - Recommended Configurations in the Arduino IDE](./docs/Board_Instructions.md#recommended-configurations-in-the-arduino-ide).

### Configuring LVGL

Expand Down
28 changes: 14 additions & 14 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![Arduino Lint](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml) [![pre-commit](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml)
[![GitHub Release](https://img.shields.io/github/v/release/esp-arduino-libs/ESP32_Display_Panel)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/releases) [![Arduino Lint](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/arduino_lint.yml) [![pre-commit](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/esp-arduino-libs/ESP32_Display_Panel/actions/workflows/pre-commit.yml)

# ESP Display Panel

* [English Version](./README.md)

ESP32_Display_Panel 是专为 ESP SoCs 设计的 Arduino 库,用于驱动显示屏并实现快速 GUI 开发。用户不仅可以直接开发多款[内部支持的开发板](src/board/Board_Instructions.md),还可以通过简单的适配来开发自定义的开发板。此外,ESP32_Display_Panel 还适配了多款 LCD 和触摸的驱动,用户也可以根据需要使用独立的驱动进行开发。
ESP32_Display_Panel 是专为 ESP SoCs 设计的 Arduino 库,用于驱动显示屏并实现快速 GUI 开发。用户不仅可以直接开发多款[内部支持的开发板](docs/Board_Instructions.md),还可以通过简单的适配来开发自定义的开发板。此外,ESP32_Display_Panel 还适配了多款 LCD 和触摸的驱动,用户也可以根据需要使用独立的驱动进行开发。

ESP32_Display_Panel 封装了多种[乐鑫组件库](https://components.espressif.com/)中相关的组件,需要基于 [arduino-esp32](https://github.com/espressif/arduino-esp32) 进行开发,并且可以直接从 Arduino IDE 中下载获取。

Expand Down Expand Up @@ -58,19 +58,19 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性:

### 开发板

下面是支持的[开发板列表](src/board/Board_Instructions.md):
下面是支持的[开发板列表](docs/Board_Instructions.md):

| **厂商** | **开发板型号** |
| -------- | -------------- |
| [Espressif](src/board/Board_Instructions.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, ESP32-S3-Box-3(beta), ESP32-S3-Box-Lite, ESP32-S3-EYE, ESP32-S3-Korvo-2, ESP32-S3-LCD-EV-Board, ESP32-S3-LCD-EV-Board-2, ESP32-S3-USB-OTG |
| [M5Stack](https://m5stack.com/) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 |
| [Jingcai](src/board/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |
| [Espressif](docs/Board_Instructions.md#espressif) | ESP32-C3-LCDkit, ESP32-S3-Box, ESP32-S3-Box-3, ESP32-S3-Box-3(beta), ESP32-S3-Box-Lite, ESP32-S3-EYE, ESP32-S3-Korvo-2, ESP32-S3-LCD-EV-Board, ESP32-S3-LCD-EV-Board-2, ESP32-S3-USB-OTG |
| [M5Stack](docs/Board_Instructions.md#m5stack) | M5STACK-M5CORE2, M5STACK-M5DIAL, M5STACK-M5CORES3 |
| [Jingcai](docs/Board_Instructions.md#shenzhen-jingcai-intelligent) | ESP32-4848S040C_I_Y_3 |

欢迎开发者和厂商贡献 PR 来添加更多的开发板,详细说明请参考 [`开发板贡献指南`](./src/board/Board_Contribution_Guide_CN.md)。
欢迎开发者和厂商贡献 PR 来添加更多的开发板,详细说明请参考 [`开发板贡献指南`](./docs/Board_Contribution_Guide_CN.md)。

### LCD 控制器

下面是支持的 [LCD 控制器列表](src/lcd/README.md):
下面是支持的 [LCD 控制器列表](docs/LCD_Controllers.md):

| **厂商** | **型号** |
| -------- | -------- |
Expand All @@ -81,7 +81,7 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性:

### 触摸控制器

下面是支持的 [触摸控制器列表](src/touch/README.md):
下面是支持的 [触摸控制器列表](docs/Touch_Controllers.md):

| **厂商** | **型号** |
| -------- | -------- |
Expand Down Expand Up @@ -112,10 +112,10 @@ ESP32_Display_Panel 的功能框图如下所示,主要包含以下特性:
3. 对于没有配置文件的工程,用户可以将其从 ESP32_Display_Panel 的根目录或者示例工程中复制到自己的工程中。
4. 如果有多个工程需要使用相同的配置,用户可以将配置文件放在 [Arduino 库目录](#arduino-库的目录在哪儿)中,这样所有的工程都可以共享相同的配置。

**Notes**:

* 同一个目录下可以同时包含 `ESP_Panel_Board_Supported.h` 和 `ESP_Panel_Board_Custom.h` 两种配置文件,但是它们不能同时被使能,即 `ESP_PANEL_USE_SUPPORTED_BOARD` 和 `ESP_PANEL_USE_CUSTOM_BOARD` 最多只能有一个为 `1`
* 如果以上两个配置文件都被没有被使能,那么用户就无法使用 `ESP_Panel` 驱动,只能使用其他独立的设备驱动,如 `ESP_PanelBus`, `ESP_PanelLcd` 等
> [!WARNING]
> * 同一个目录下可以同时包含 `ESP_Panel_Board_Supported.h` 和 `ESP_Panel_Board_Custom.h` 两种配置文件,但是它们不能同时被使能,即 `ESP_PANEL_USE_SUPPORTED_BOARD` 和 `ESP_PANEL_USE_CUSTOM_BOARD` 最多只能有一个为 `1`。
> * 如果以上两个配置文件都被没有被使能,那么用户就无法使用 `ESP_Panel` 驱动,只能使用其他独立的设备驱动,如 `ESP_PanelBus`, `ESP_PanelLcd` 等
> * 由于这些文件内的配置可能会发生变化,比如新增、删除或重命名,为了保证程序的兼容性,库对它们分别进行了独立的版本管理,并在编译时检查用户当前使用的配置文件与库是否兼容。详细的版本信息以及检查规则可以在文件的末尾处找到

#### 配置驱动

Expand Down Expand Up @@ -309,7 +309,7 @@ ESP32_Display_Panel 会根据 [ESP_Panel_Board_Custom.h](./ESP_Panel_Board_Custo

### 配置支持的开发板

关于如何在 Arduino IDE 中配置支持的开发板,请参考 [Board_Instructions.md](./src/board/Board_Instructions.md#recommended-configurations-in-the-arduino-ide).
关于如何在 Arduino IDE 中配置支持的开发板,请参考 [Board_Instructions - Recommended Configurations in the Arduino IDE](./docs/Board_Instructions.md#recommended-configurations-in-the-arduino-ide).

### 配置 LVGL

Expand Down
Loading
Loading