|
11 | 11 | - [Where are the installation directory for arduino-esp32 and the SDK located?](#where-are-the-installation-directory-for-arduino-esp32-and-the-sdk-located)
|
12 | 12 | - [How to fix screen drift issue when driving RGB LCD with ESP32-S3?](#how-to-fix-screen-drift-issue-when-driving-rgb-lcd-with-esp32-s3)
|
13 | 13 | - [How to Use ESP32\_Display\_Panel on PlatformIO?](#how-to-use-esp32_display_panel-on-platformio)
|
| 14 | + - [How to add an LVGL library and how to configure?](#How-to-add-an-LVGL-library-and-how-to-configure) |
14 | 15 |
|
15 | 16 | ## Where is the directory for Arduino libraries?
|
16 | 17 |
|
@@ -82,3 +83,73 @@ When encountering screen drift issue when driving RGB LCD with ESP32-S3, you can
|
82 | 83 | ## How to Use ESP32_Display_Panel on PlatformIO?
|
83 | 84 |
|
84 | 85 | You can refer to the example [PlatformIO](../examples/PlatformIO/) to use the ESP32_Display_Panel library in PlatformIO. By default, it is suitable for the **ESP32-S3-LCD-EV-Board** and **ESP32-S3-LCD-EV-Board-2** development boards. You need to modify the [boards/ESP-LCD.json](../examples/PlatformIO/boards/ESP-LCD.json) file according to the actual situation.
|
| 86 | + |
| 87 | +## How to add an LVGL library and how to configure? |
| 88 | +* How to use it normally |
| 89 | + |
| 90 | + 1.Download the LVGL library in Arduino, it is best to choose the `V8.4.0` version. |
| 91 | + |
| 92 | + 2.Find the downloaded LVGL library, copy and paste the `lv_conf_template.h` file into the same directory as the LVGL library. |
| 93 | + |
| 94 | + 3.Change the `lv_conf_template.h` file name to `lv_conf.h`. |
| 95 | + |
| 96 | + 4.Open `lv_conf.h` to modify the macro definition and save: `#if 0`--> `#if 1` |
| 97 | + ```c |
| 98 | + ... |
| 99 | + /* clang-format off */ |
| 100 | + #if 1 /*Set it to "1" to enable content*/ |
| 101 | + |
| 102 | + #ifndef LV_CONF_H |
| 103 | + #define LV_CONF_H |
| 104 | + |
| 105 | + #include <stdint.h> |
| 106 | + ... |
| 107 | + ``` |
| 108 | +* How to use the examples and demos in lvgl |
| 109 | +
|
| 110 | + please open the corresponding macros |
| 111 | + ```c |
| 112 | + ... |
| 113 | + /*================== |
| 114 | + * EXAMPLES |
| 115 | + *==================*/ |
| 116 | + |
| 117 | + /*Enable the examples to be built with the library*/ |
| 118 | + #define LV_BUILD_EXAMPLES 1 |
| 119 | + |
| 120 | + /*=================== |
| 121 | + * DEMO USAGE |
| 122 | + ====================*/ |
| 123 | + |
| 124 | + /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ |
| 125 | + #define LV_USE_DEMO_WIDGETS 1 |
| 126 | + #if LV_USE_DEMO_WIDGETS |
| 127 | + #define LV_DEMO_WIDGETS_SLIDESHOW 0 |
| 128 | + #endif |
| 129 | + |
| 130 | + /*Demonstrate the usage of encoder and keyboard*/ |
| 131 | + #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0 |
| 132 | + |
| 133 | + /*Benchmark your system*/ |
| 134 | + #define LV_USE_DEMO_BENCHMARK 0 |
| 135 | + #if LV_USE_DEMO_BENCHMARK |
| 136 | + /*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/ |
| 137 | + #define LV_DEMO_BENCHMARK_RGB565A8 0 |
| 138 | + #endif |
| 139 | + |
| 140 | + /*Stress test for LVGL*/ |
| 141 | + #define LV_USE_DEMO_STRESS 0 |
| 142 | + |
| 143 | + /*Music player demo*/ |
| 144 | + #define LV_USE_DEMO_MUSIC 0 |
| 145 | + #if LV_USE_DEMO_MUSIC |
| 146 | + #define LV_DEMO_MUSIC_SQUARE 0 |
| 147 | + #define LV_DEMO_MUSIC_LANDSCAPE 0 |
| 148 | + #define LV_DEMO_MUSIC_ROUND 0 |
| 149 | + #define LV_DEMO_MUSIC_LARGE 0 |
| 150 | + #define LV_DEMO_MUSIC_AUTO_PLAY 0 |
| 151 | + #endif |
| 152 | +
|
| 153 | + ... |
| 154 | + ``` |
| 155 | + |
0 commit comments