How to set a custom tick source function
What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
What do you want to achieve?
I’d like to set a custom tick function but the define generated refers to a string, not to the function itself.
What have you tried so far?
I set the HAL values using menuconfig in lvlg component menu. Hal settings in sdkconfig are:
# # HAL Settings # CONFIG_LV_TICK_CUSTOM=y CONFIG_LV_TICK_CUSTOM_INCLUDE="esp_timer.h" CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR="(long)esp_timer_get_time()/1000" # end of HAL Settings
The generated line in sdkconfig.h is
#define CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR "(long)esp_timer_get_time()/1000"
Shouldn’t it be as follows?
#define CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR (long)esp_timer_get_time()/1000
The result is that the the function lv_tick_get() returns the pointer to the string of the define, not the result of the function. Am I doing something wrong in menuconfig?
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.