1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00
lvgl/docs/porting/task-handler.md
Gabor Kiss-Vamosi f97f87fdcd docs link fixes
2021-05-17 16:17:20 +02:00

589 B

.. include:: /header.rst 
:github_url: |github_link_base|/porting/task-handler.md

Task Handler

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

The timing is not critical but it should be about 5 milliseconds to keep the system responsive.

Example:

while(1) {
  lv_timer_handler();
  my_delay_ms(5);
}

To learn more about timers visit the Timer section.