-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(example): add docs for PlatformIO
- Loading branch information
Showing
17 changed files
with
196 additions
and
847 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# PlatformIO Example | ||
|
||
The example is used to guide how to use this library in PlatformIO. It also demonstrates how to port LVGL (v8.3.x). And for RGB LCD, it can enable the avoid tearing fucntion. | ||
|
||
It is by default suitable for **ESP32-S3-LCD-EV-Board** and **ESP32-S3-LCD-EV-Board-2** boards. Users should modify the [boards/ESP-LCD.json](boards/ESP-LCD.json) file as needed. | ||
|
||
## How to Use | ||
|
||
Follow the steps below to configure: | ||
|
||
1. For **ESP32_Display_Panel**: | ||
|
||
- Follow the [steps](../../README.md#configuring-drivers) to configure drivers if needed. | ||
- If using a supported development board, follow the [steps](../../README.md#using-supported-development-boards) to configure it. | ||
- If using a custom board, follow the [steps](../../README.md#using-custom-development-boards) to configure it. | ||
|
||
2. For **lvgl**: | ||
|
||
- Follow the [steps](../../README.md#configuring-lvgl) to add *lv_conf.h* file and change the configurations. | ||
- Modify the macros in the [lvgl_port_v8.h](./lvgl_port_v8.h) file to configure the LVGL porting parameters. | ||
|
||
3. Navigate to the `Tools` menu in the Arduino IDE to choose a ESP board and configure its parameters. For supported boards, please refter to [Configuring Supported Development Boards](../../README.md#configuring-supported-development-boards) | ||
4. Verify and upload the example to your ESP board. | ||
|
||
## Serial Output | ||
|
||
```bash | ||
... | ||
LVGL porting example start | ||
Initialize panel device | ||
Initialize LVGL | ||
Create UI | ||
LVGL porting example end | ||
IDLE loop | ||
IDLE loop | ||
... | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
Please check the [FAQ](../../README.md#faq) first to see if the same question exists. If not, please create a [Github issue](https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues). We will get back to you as soon as possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
///////////////////////////////////////////////// Debug Configurations ///////////////////////////////////////////////// | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/* Set to 1 if assert on error. Otherwise print error message */ | ||
#define ESP_PANEL_CHECK_RESULT_ASSERT (0) // 0/1 | ||
|
||
/* Set to 1 if print log message for debug */ | ||
#define ESP_PANEL_ENABLE_LOG (0) // 0/1 | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
///////////////////////////////////////////// Touch Driver Configurations ////////////////////////////////////////////// | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/* Maximum point number */ | ||
#define ESP_PANEL_TOUCH_MAX_POINTS (5) | ||
/* Maximum button number */ | ||
#define ESP_PANEL_TOUCH_MAX_BUTTONS (1) | ||
|
||
/** | ||
* XPT2046 related | ||
* | ||
*/ | ||
#define ESP_PANEL_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum Z pressure threshold | ||
/** | ||
* Enable Interrupt (PENIRQ) output, also called Full Power Mode. | ||
* Enable this to configure the XPT2046 to output low on the PENIRQ output if a touch is detected. | ||
* This mode uses more power when enabled. Note that this signal goes low normally when a read is active. | ||
*/ | ||
#define ESP_PANEL_TOUCH_XPT2046_INTERRUPT_MODE (0) // 0/1 | ||
/** | ||
* Keep internal Vref enabled. | ||
* Enable this to keep the internal Vref enabled between conversions. This uses slightly more power, | ||
* but requires fewer transactions when reading the battery voltage, aux voltage and temperature. | ||
* | ||
*/ | ||
#define ESP_PANEL_TOUCH_XPT2046_VREF_ON_MODE (0) // 0/1 | ||
/** | ||
* Convert touch coordinates to screen coordinates. | ||
* When this option is enabled the raw ADC values will be converted from 0-4096 to 0-{screen width} or 0-{screen height}. | ||
* When this option is disabled the process_coordinates method will need to be used to convert the raw ADC values into a | ||
* screen coordinate. | ||
* | ||
*/ | ||
#define ESP_PANEL_TOUCH_XPT2046_CONVERT_ADC_TO_COORDS (1) // 0/1 | ||
/** | ||
* Enable data structure locking. | ||
* By enabling this option the XPT2046 driver will lock the touch position data structures when reading values from the | ||
* XPT2046 and when reading position data via API. | ||
* WARNING: enabling this option may result in unintended crashes. | ||
* | ||
*/ | ||
#define ESP_PANEL_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1 | ||
|
||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// | ||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* Do not change the following versions, they are used to check if the configurations in this file are compatible with | ||
* the current version of `ESP_Panel_Board_Custom.h` in the library. The detailed rules are as follows: | ||
* | ||
* 1. If the major version is not consistent, then the configurations in this file are incompatible with the library | ||
* and must be replaced with the file from the library. | ||
* 2. If the minor version is not consistent, this file might be missing some new configurations, which will be set to | ||
* default values. It is recommended to replace it with the file from the library. | ||
* 3. Even if the patch version is not consistent, it will not affect normal functionality. | ||
* | ||
*/ | ||
#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 0 | ||
#define ESP_PANEL_CONF_FILE_VERSION_MINOR 1 | ||
#define ESP_PANEL_CONF_FILE_VERSION_PATCH 1 |
Oops, something went wrong.