Hi, I am new to use lvgl. when I create a timer to print something but the timer not run. In my device I create a task to run lvgl task handler and a task to run other code
void my_timer_cb(struct _lv_timer_t * timer)
{
LV_LOG_USER(“lv_timer_cb is call”);
}
void events_init_home(lv_ui_t *ui) {
// lv_obj_add_event_cb(ui->home, event_cb_home, LV_EVENT_CLICKED, NULL);
lv_timer_t *timer = lv_timer_create(my_timer_cb, 100, NULL);
}
void setup_scr_home(lv_ui_t *ui)
{
ui->home = lv_obj_create(NULL);
ui->btn = lv_btn_create(ui->home);
lv_obj_set_size(ui->btn, 100, 50);
lv_obj_center(ui->btn);
ui->label = lv_label_create(ui->btn);
lv_label_set_text(ui->label , "home");
lv_obj_center(ui->label);
events_init_home(ui);
}
when the screen display. the timer not run