docs link fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-17 16:17:20 +02:00
parent 103311192c
commit f97f87fdcd
20 changed files with 64 additions and 38 deletions

View File

@@ -8,14 +8,14 @@ LVGL is **not thread-safe** by default.
However, in the following conditions it's valid to call LVGL related functions:
- In *events*. Learn more in [Events](/overview/event).
- In *lv_tasks*. Learn more in [Tasks](/overview/task).
- In *lv_timer*. Learn more in [Timers](/overview/timter).
## Tasks and threads
If you need to use real tasks or threads, you need a mutex which should be invoked before the call of `lv_task_handler` and released after it.
If you need to use real tasks or threads, you need a mutex which should be invoked before the call of `lv_timer_handler` and released after it.
Also, you have to use the same mutex in other tasks and threads around every LVGL (`lv_...`) related function calls and codes.
This way you can use LVGL in a real multitasking environment. Just make use of a mutex to avoid the concurrent calling of LVGL functions.
## Interrupts
Try to avoid calling LVGL functions from the interrupts (except `lv_tick_inc()` and `lv_disp_flush_ready()`). But, if you need to do this you have to disable the interrupt which uses LVGL functions while `lv_task_handler` is running.
It's a better approach to set a flag or some value and periodically check it in an `lv_task`.
Try to avoid calling LVGL functions from the interrupts (except `lv_tick_inc()` and `lv_disp_flush_ready()`). But, if you need to do this you have to disable the interrupt which uses LVGL functions while `lv_timer_handler` is running.
It's a better approach to set a flag or some value and periodically check it in an `lv_timer`.

View File

@@ -4,7 +4,7 @@
```
# Task Handler
To handle the tasks of LVGL you need to call `lv_task_handler()` periodically in one of the followings:
To handle the tasks of LVGL you need to call `lv_timer_handler()` periodically in one of the followings:
- *while(1)* of *main()* function
- timer interrupt periodically (low priority then `lv_tick_inc()`)
- an OS task periodically
@@ -14,10 +14,10 @@ The timing is not critical but it should be about 5 milliseconds to keep the sys
Example:
```c
while(1) {
lv_task_handler();
lv_timer_handler();
my_delay_ms(5);
}
```
To learn more about task visit the [Tasks](/overview/task) section.
To learn more about timers visit the [Timer](/overview/timer) section.