forked from xuos/xiuos
LVGL demo update
This commit is contained in:
parent
90b7740ca0
commit
fbeb75d1f1
|
@ -30,16 +30,16 @@
|
|||
// extern void lv_example_img_3(void);
|
||||
// extern void lv_example_img_4(void);
|
||||
// extern void lv_example_line_1(void);
|
||||
// extern void lv_example_aoteman(void);
|
||||
extern void lv_example_aoteman(void);
|
||||
void* lvgl_thread(void *parameter)
|
||||
{
|
||||
/* display demo; you may replace with your LVGL application at here */
|
||||
lv_demo_calendar();
|
||||
// lv_demo_calendar();
|
||||
// lv_example_img_1();
|
||||
// lv_example_chart_2();
|
||||
// lv_example_table_1();
|
||||
// lv_example_line_1();
|
||||
// lv_example_aoteman();
|
||||
lv_example_aoteman();
|
||||
/* handle the tasks of LVGL */
|
||||
while(1)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ int lv_port_init(void)
|
|||
#endif
|
||||
|
||||
#ifndef PKG_USING_LVGL_INDEV_DEVICE
|
||||
lv_port_indev_init();
|
||||
// lv_port_indev_init();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -39,14 +39,14 @@ void* ttf_thread(void *parameter)
|
|||
}
|
||||
}
|
||||
|
||||
pthread_t lvgl_task;
|
||||
pthread_t lvgl_task_2;
|
||||
static int ttf_demo_init(void)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
attr.schedparam.sched_priority = 25;
|
||||
attr.stacksize = 4096;
|
||||
|
||||
PrivTaskCreate(&lvgl_task, &attr, ttf_thread, NULL);
|
||||
PrivTaskCreate(&lvgl_task_2, &attr, ttf_thread, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,11 +4,11 @@
|
|||
|
||||
void lv_example_aoteman(void)
|
||||
{
|
||||
LV_IMG_DECLARE(aoteman);
|
||||
LV_IMG_DECLARE(xiuos);
|
||||
lv_obj_t * img1 = lv_img_create(lv_scr_act());
|
||||
lv_img_set_src(img1, &aoteman);
|
||||
lv_img_set_src(img1, &xiuos);
|
||||
lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20);
|
||||
lv_obj_set_size(img1, 320, 240);
|
||||
lv_obj_set_size(img1, 320, 320);
|
||||
|
||||
lv_obj_t * img2 = lv_img_create(lv_scr_act());
|
||||
lv_img_set_src(img2, LV_SYMBOL_OK "Accept");
|
||||
|
|
Loading…
Reference in New Issue