docs(arduino): update tick setup (#5832)

This commit is contained in:
Gabor Kiss-Vamosi
2024-03-12 08:41:10 +01:00
committed by GitHub
parent 09985a8e80
commit 803ca4aa63
2 changed files with 3 additions and 2 deletions

View File

@@ -77,6 +77,9 @@ void setup()
lv_init();
/*Set a tick source so that LVGL will know how much time elapsed. */
lv_tick_set_cb(millis);
/* register print function for debugging */
#if LV_USE_LOG != 0
lv_log_register_print_cb( my_print );
@@ -127,6 +130,5 @@ void setup()
void loop()
{
lv_task_handler(); /* let the GUI do its work */
lv_tick_inc(5); /* tell LVGL how much time has passed */
delay(5); /* let this time pass */
}