diff options
author | Gabor Kiss-Vamosi <kisvegabor@gmail.com> | 2024-03-12 08:41:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 15:41:10 +0800 |
commit | 803ca4aa63315add5c853918396d993238eaf04e (patch) | |
tree | 1796836de7a31b541ef19548fd9088a4af5627af /examples/arduino | |
parent | 09985a8e8047e235bce7f9259a3f2afc8c0cead4 (diff) | |
download | lvgl-803ca4aa63315add5c853918396d993238eaf04e.tar.gz lvgl-803ca4aa63315add5c853918396d993238eaf04e.zip |
docs(arduino): update tick setup (#5832)
Diffstat (limited to 'examples/arduino')
-rw-r--r-- | examples/arduino/LVGL_Arduino/LVGL_Arduino.ino | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino b/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino index 54ad04502..03ed8eb90 100644 --- a/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino +++ b/examples/arduino/LVGL_Arduino/LVGL_Arduino.ino @@ -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 */ } |