UP tft SIM
This commit is contained in:
10
demo/lvgl/t_lvgl.h
Normal file
10
demo/lvgl/t_lvgl.h
Normal file
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by lydxh on 2024/5/10.
|
||||
//
|
||||
|
||||
#ifndef HW_LIB_T_LVGL_H
|
||||
#define HW_LIB_T_LVGL_H
|
||||
|
||||
void Test_lvgl();
|
||||
|
||||
#endif //HW_LIB_T_LVGL_H
|
29
demo/lvgl/test.c
Normal file
29
demo/lvgl/test.c
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "stdio.h"
|
||||
#include "lv_port_disp.h"
|
||||
#include "lv_port_indev.h"
|
||||
#include "lvgl.h"
|
||||
#include "lv_demo_widgets.h"
|
||||
#include <windows.h>
|
||||
#include "t_lvgl.h"
|
||||
|
||||
void Test_lvgl() {
|
||||
lv_init();
|
||||
lv_port_disp_init();
|
||||
lv_port_indev_init();
|
||||
|
||||
// lv_obj_t * bar1 = lv_bar_create(lv_scr_act());
|
||||
// lv_obj_set_size(bar1, 200, 20);
|
||||
// lv_obj_center(bar1);
|
||||
// lv_bar_set_value(bar1, 70, LV_ANIM_OFF);
|
||||
// lv_demo_widgets();
|
||||
// printf("\nTEST Widgets\n");
|
||||
|
||||
while (1) {
|
||||
/* Periodically call the lv_task handler.
|
||||
* It could be done in a timer interrupt or an OS task too.*/
|
||||
lv_timer_handler();
|
||||
lv_tick_inc(5);
|
||||
Sleep(5);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user