Minor document update (#3185)
* chore(docs): change "-DLV_USE_BTN 1" to "-DLV_USE_BTN=1" Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * chore(docs): update demo related link and description Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -71,23 +71,13 @@ target_link_libraries(MyFirmware PRIVATE lvgl::lvgl lvgl::examples)
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Building LVGL drivers and demos with CMake
|
## Building LVGL drivers and demos with CMake
|
||||||
Exactly the same goes for the [drivers](https://github.com/lvgl/lv_drivers) and the [demos](https://github.com/lvgl/lv_demos).
|
Exactly the same goes for the [drivers](https://github.com/lvgl/lv_drivers) and the [demos](https://github.com/lvgl/lvgl/demos).
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
# Specify path to own LVGL demos config header
|
|
||||||
set(LV_DEMO_CONF_PATH
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/lv_demo_conf.h
|
|
||||||
CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
FetchContent_Declare(lv_drivers
|
FetchContent_Declare(lv_drivers
|
||||||
GIT_REPOSITORY https://github.com/lvgl/lv_drivers)
|
GIT_REPOSITORY https://github.com/lvgl/lv_drivers)
|
||||||
FetchContent_MakeAvailable(lv_drivers)
|
FetchContent_MakeAvailable(lv_drivers)
|
||||||
FetchContent_Declare(lv_demos
|
|
||||||
GIT_REPOSITORY https://github.com/lvgl/lv_demos.git)
|
|
||||||
FetchContent_MakeAvailable(lv_demos)
|
|
||||||
|
|
||||||
# The target "MyFirmware" depends on LVGL, drivers and demos
|
# The target "MyFirmware" depends on LVGL, drivers and demos
|
||||||
target_link_libraries(MyFirmware PRIVATE lvgl::lvgl lvgl::drivers lvgl::examples)
|
target_link_libraries(MyFirmware PRIVATE lvgl::lvgl lvgl::drivers lvgl::examples)
|
||||||
```
|
```
|
||||||
|
|
||||||
Just like the [lv_conf.h](https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h) header demos comes with its own config header called [lv_demo_conf.h](https://github.com/lvgl/lv_demos/blob/master/lv_demo_conf_template.h). Analogous to `LV_CONF_PATH` its path can be set by using the option `LV_DEMO_CONF_PATH`.
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ More information about ESP-IDF build system can be found [here](https://docs.esp
|
|||||||
|
|
||||||
## LVGL demo project for ESP32
|
## LVGL demo project for ESP32
|
||||||
|
|
||||||
We've created [lv_port_esp32](https://github.com/lvgl/lv_port_esp32), a project using ESP-IDF and LVGL to show one of the demos from [lv_demos](https://github.com/lvgl/lv_demos).
|
We've created [lv_port_esp32](https://github.com/lvgl/lv_port_esp32), a project using ESP-IDF and LVGL to show one of the demos from [demos](https://github.com/lvgl/lvgl/demos).
|
||||||
You can configure the project to use one of the many supported display controllers and targets (chips).
|
You can configure the project to use one of the many supported display controllers and targets (chips).
|
||||||
|
|
||||||
See [lvgl_esp32_drivers](https://github.com/lvgl/lvgl_esp32_drivers) repository for a complete list
|
See [lvgl_esp32_drivers](https://github.com/lvgl/lvgl_esp32_drivers) repository for a complete list
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Therefore it's recommended to choose the size of the draw buffer(s) to be at lea
|
|||||||
|
|
||||||
There are several settings to adjust the number draw buffers and buffering/refreshing modes.
|
There are several settings to adjust the number draw buffers and buffering/refreshing modes.
|
||||||
|
|
||||||
You can measure the performance of different configurations using the [benchmark example](https://github.com/lvgl/lv_demos/tree/master/src/lv_demo_benchmark).
|
You can measure the performance of different configurations using the [benchmark example](https://github.com/lvgl/lvgl/tree/master/demos/benchmark).
|
||||||
|
|
||||||
### One buffer
|
### One buffer
|
||||||
If only one buffer is used LVGL draws the content of the screen into that draw buffer and sends it to the display.
|
If only one buffer is used LVGL draws the content of the screen into that draw buffer and sends it to the display.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ In this case LVGL will attempt to include `lv_conf.h` simply with `#include "lv_
|
|||||||
You can even use a different name for `lv_conf.h`. The custom path can be set via the `LV_CONF_PATH` define.
|
You can even use a different name for `lv_conf.h`. The custom path can be set via the `LV_CONF_PATH` define.
|
||||||
For example `-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"`
|
For example `-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"`
|
||||||
|
|
||||||
If `LV_CONF_SKIP` is defined, LVGL will not try to include `lv_conf.h`. Instead you can pass the config defines using build options. For example `"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN 1"`. The unset options will get a default value which is the same as the ones in `lv_conf_template.h`.
|
If `LV_CONF_SKIP` is defined, LVGL will not try to include `lv_conf.h`. Instead you can pass the config defines using build options. For example `"-DLV_COLOR_DEPTH=32 -DLV_USE_BTN=1"`. The unset options will get a default value which is the same as the ones in `lv_conf_template.h`.
|
||||||
|
|
||||||
LVGL also can be used via `Kconfig` and `menuconfig`. You can use `lv_conf.h` together with Kconfig, but keep in mind that the value from `lv_conf.h` or build settings (`-D...`) overwrite the values set in Kconfig. To ignore the configs from `lv_conf.h` simply remove its content, or define `LV_CONF_SKIP`.
|
LVGL also can be used via `Kconfig` and `menuconfig`. You can use `lv_conf.h` together with Kconfig, but keep in mind that the value from `lv_conf.h` or build settings (`-D...`) overwrite the values set in Kconfig. To ignore the configs from `lv_conf.h` simply remove its content, or define `LV_CONF_SKIP`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user