docs: explain how to run other demos and examples (#81)
This commit is contained in:
parent
c665924470
commit
958f95d26b
24
README.md
24
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:
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user