This commit is contained in:
JiXieShi
2024-09-21 23:07:22 +08:00
parent 6c9a999c71
commit 8f7f72712c
27 changed files with 100 additions and 81 deletions

View File

@@ -5,6 +5,6 @@
#ifndef HW_LIB_T_LVGL_H
#define HW_LIB_T_LVGL_H
void Test_lvgl(void *pVoid);
int Test_lvgl(void *pVoid);
#endif //HW_LIB_T_LVGL_H

View File

@@ -4,7 +4,7 @@
#include "lvgl.h"
#include <windows.h>
#include "t_lvgl.h"
#include "SDL3/SDL.h"
static void btn_event_cb(lv_event_t *e) {
lv_event_code_t code = lv_event_get_code(e);
@@ -33,21 +33,21 @@ void lv_example_get_started_1(void) {
lv_obj_center(label);
}
void Test_lvgl(void *pVoid) {
int Test_lvgl(void *pVoid) {
lv_init();
lv_port_disp_init();
lv_port_indev_init();
// lv_port_indev_init();
lv_example_get_started_1();
// lv_demo_widgets();
printf("\nTEST Widgets\n");
// 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);
SDL_Delay(5);
}
return 0;
}