Use LV_TICK_CUSTOM only on Arduino

This commit is contained in:
fvanroie 2021-07-22 18:50:58 +02:00
parent 8d8434aeda
commit f7dfa7db72

View File

@ -79,10 +79,15 @@
/*Use a custom tick source that tells the elapsed time in milliseconds.
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
#ifdef ARDUINO
#define LV_TICK_CUSTOM 1
#else
#define LV_TICK_CUSTOM 0
#endif
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the sys time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.