diff --git a/README.md b/README.md index 3a35af1..6516d13 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,30 @@ cmake .. make -j ``` +## Run demos and examples + +By default, the widgets demo (`lv_demo_widgets()`) will run. If you want to run a different demo or example from the LVGL library, +simply replace the demo function call in the code with another one—such as `lv_demo_benchmark()` or `lv_example_label_1()`. + +```c +int main(int argc, char **argv) +{ + /* ... */ + /* Run the default demo */ + /* To try a different demo or example, replace this with one of: */ + /* - lv_demo_benchmark(); */ + /* - lv_demo_stress(); */ + /* - lv_example_label_1(); */ + /* - etc. */ + lv_demo_widgets(); + + while(1) { + /* ... */ + } + return 0; +} +``` + ## Optional library There are also FreeType and FFmpeg support. You can install these according to the followings: diff --git a/main/src/main.c b/main/src/main.c index 3016c70..b61664f 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -76,6 +76,12 @@ int main(int argc, char **argv) #if LV_USE_OS == LV_OS_NONE + /* Run the default demo */ + /* To try a different demo or example, replace this with one of: */ + /* - lv_demo_benchmark(); */ + /* - lv_demo_stress(); */ + /* - lv_example_label_1(); */ + /* - etc. */ lv_demo_widgets(); while(1) {