Task Handler(任务处理器)

查看原文

To handle the tasks of LVGL you need to call lv_timer_handler() periodically in one of the following:

  • while(1) of main() function

  • timer interrupt periodically (lower priority than 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:

要处理 LVGL 的任务,您需要以下列方式之一定期调用 lv_timer_handler()

  • main() 函数的 while(1)

  • 定时器定期中断(比 lv_tick_inc() 优先级低)

  • 定期执行操作系统任务

时间并不重要,但它应该是大约 5 毫秒以保持系统响应。

示例:

while(1) {
  lv_timer_handler();
  my_delay_ms(5);
}
查看原文

To learn more about timers visit the Timer section.

要了解有关计时器的更多信息,请访问 Timer 部分。