This commit is contained in:
2024-08-29 16:46:54 +08:00
parent 899dcdd294
commit d7d34508d6
21 changed files with 2344 additions and 342 deletions

10
demo/tft/t_tft.h Normal file
View File

@@ -0,0 +1,10 @@
//
// Created by lydxh on 2024/5/10.
//
#ifndef HW_LIB_T_TFT_H
#define HW_LIB_T_TFT_H
void Test_tft();
#endif //HW_LIB_T_TFT_H

29
demo/tft/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_tft.h"
void Test_tft() {
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);
}
}