LVGL demo update

This commit is contained in:
Jiang Yufan 2023-08-22 13:56:41 +08:00
parent 90b7740ca0
commit fbeb75d1f1
5 changed files with 1336 additions and 9 deletions

View File

@ -30,16 +30,16 @@
// extern void lv_example_img_3(void); // extern void lv_example_img_3(void);
// extern void lv_example_img_4(void); // extern void lv_example_img_4(void);
// extern void lv_example_line_1(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) void* lvgl_thread(void *parameter)
{ {
/* display demo; you may replace with your LVGL application at here */ /* display demo; you may replace with your LVGL application at here */
lv_demo_calendar(); // lv_demo_calendar();
// lv_example_img_1(); // lv_example_img_1();
// lv_example_chart_2(); // lv_example_chart_2();
// lv_example_table_1(); // lv_example_table_1();
// lv_example_line_1(); // lv_example_line_1();
// lv_example_aoteman(); lv_example_aoteman();
/* handle the tasks of LVGL */ /* handle the tasks of LVGL */
while(1) while(1)
{ {

View File

@ -52,7 +52,7 @@ int lv_port_init(void)
#endif #endif
#ifndef PKG_USING_LVGL_INDEV_DEVICE #ifndef PKG_USING_LVGL_INDEV_DEVICE
lv_port_indev_init(); // lv_port_indev_init();
#endif #endif
return 0; return 0;

View File

@ -39,14 +39,14 @@ void* ttf_thread(void *parameter)
} }
} }
pthread_t lvgl_task; pthread_t lvgl_task_2;
static int ttf_demo_init(void) static int ttf_demo_init(void)
{ {
pthread_attr_t attr; pthread_attr_t attr;
attr.schedparam.sched_priority = 25; attr.schedparam.sched_priority = 25;
attr.stacksize = 4096; attr.stacksize = 4096;
PrivTaskCreate(&lvgl_task, &attr, ttf_thread, NULL); PrivTaskCreate(&lvgl_task_2, &attr, ttf_thread, NULL);
return 0; return 0;
} }

File diff suppressed because one or more lines are too long

View File

@ -4,11 +4,11 @@
void lv_example_aoteman(void) void lv_example_aoteman(void)
{ {
LV_IMG_DECLARE(aoteman); LV_IMG_DECLARE(xiuos);
lv_obj_t * img1 = lv_img_create(lv_scr_act()); 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_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_obj_t * img2 = lv_img_create(lv_scr_act());
lv_img_set_src(img2, LV_SYMBOL_OK "Accept"); lv_img_set_src(img2, LV_SYMBOL_OK "Accept");