UP tft SIM

This commit is contained in:
JiXieShi
2024-09-21 12:48:44 +08:00
parent 3334f19eb4
commit 919a9ed1a7
11 changed files with 279 additions and 42 deletions

10
demo/lvgl/t_lvgl.h Normal file
View 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
View 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);
}
}