You cannot call them in the same loop:
/* WRONG */
while(1)
{
lv_task_handler();
lv_tick_inc(10);
sleep_ms(10);
}
But you can use an interrupt/timer/different thread:
void timer_interrupt(void)
{
lv_tick_inc(10); /* if the timer fires every 10 milliseconds */
}
. . .
while(1)
{
lv_task_handler();
sleep_ms(10);
}