chore: add an option to "LV_TICK_CUSTOM" (#3870)
This commit is contained in:
@@ -40,7 +40,8 @@ else()
|
|||||||
|
|
||||||
idf_component_register(SRCS ${SOURCES} ${EXAMPLE_SOURCES} ${DEMO_SOURCES}
|
idf_component_register(SRCS ${SOURCES} ${EXAMPLE_SOURCES} ${DEMO_SOURCES}
|
||||||
INCLUDE_DIRS ${LVGL_ROOT_DIR} ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../
|
INCLUDE_DIRS ${LVGL_ROOT_DIR} ${LVGL_ROOT_DIR}/src ${LVGL_ROOT_DIR}/../
|
||||||
${LVGL_ROOT_DIR}/examples ${LVGL_ROOT_DIR}/demos)
|
${LVGL_ROOT_DIR}/examples ${LVGL_ROOT_DIR}/demos
|
||||||
|
REQUIRES esp_timer)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
|
||||||
|
|||||||
@@ -82,6 +82,9 @@
|
|||||||
#if LV_TICK_CUSTOM
|
#if LV_TICK_CUSTOM
|
||||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
#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_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||||
|
/*If using lvgl as ESP32 component*/
|
||||||
|
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||||
|
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||||
#endif /*LV_TICK_CUSTOM*/
|
#endif /*LV_TICK_CUSTOM*/
|
||||||
|
|
||||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||||
|
|||||||
@@ -288,6 +288,9 @@
|
|||||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
/*If using lvgl as ESP32 component*/
|
||||||
|
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||||
|
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||||
#endif /*LV_TICK_CUSTOM*/
|
#endif /*LV_TICK_CUSTOM*/
|
||||||
|
|
||||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||||
|
|||||||
Reference in New Issue
Block a user