浏览代码

change: lvgl的win32驱动转移到bsp/win32下,免得其他bsp编译时引用它

Wendal Chen 4 年之前
父节点
当前提交
b45826fa1c

+ 4 - 2
bsp/win32/CMakeLists.txt

@@ -19,6 +19,7 @@ include_directories(./include)
 include_directories(${TOPROOT}/lua/include
                     ${TOPROOT}/luat/include
                     ${TOPROOT}/components/freertos/include
+                    ./lv_drivers
                     )
 IF (WIN32)
      include_directories(${TOPROOT}/components/freertos/portable/MSVC-MingW)
@@ -82,6 +83,7 @@ add_library(luat ${TOPROOT}/luat/modules/luat_main.c
                  ${TOPROOT}/luat/packages/lfs/lfs_util.c
                  ${TOPROOT}/luat/packages/lfs/lfs.c
                  ${TOPROOT}/luat/packages/lfs/luat_lib_lfs2.c
+                 ./lv_drivers/win_drv.c
                #   ${LCD_SRCS}
             )
 
@@ -123,6 +125,6 @@ add_subdirectory(${TOPROOT}/components/lvgl lvgl.out)
 # 指定生成目标
 add_executable(luatos src/main_win32.c src/lua.c)
 target_link_libraries(luat freertos10 winmm fatfs lvgl lua)
-target_link_libraries(luatos freertos10 lua luatos_msys luat winmm cjson
-                      mbedtls fatfs lvgl 
+target_link_libraries(luatos freertos10 lua luatos_msys  lvgl luat winmm cjson
+                      mbedtls fatfs
                       )

+ 1 - 1
components/lvgl/exts/lv_drivers/win_drv.c → bsp/win32/lv_drivers/win_drv.c

@@ -301,7 +301,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
         DestroyWindow(hwnd);
         return 0;
     case WM_PAINT:
-        on_paint();
+        //on_paint();
         return 0;
     case WM_TIMER:
         lv_tick_inc(25);

+ 1 - 1
components/lvgl/exts/lv_drivers/win_drv.h → bsp/win32/lv_drivers/win_drv.h

@@ -17,7 +17,7 @@ extern "C" {
 #ifdef LV_CONF_INCLUDE_SIMPLE
 #include "lv_drv_conf.h"
 #else
-#include "../src/lv_drv_conf.h"
+#include "src/lv_drv_conf.h"
 #endif
 #endif
 

+ 1 - 1
components/lvgl/binding/luat_lib_lvgl_indev_ext.c

@@ -12,7 +12,7 @@
 static lv_indev_data_t point_emulator_data = {0};
 static lv_indev_data_t keyboard_emulator_data = {0};
 
-bool point_input_read(lv_indev_drv_t * drv, lv_indev_data_t*data) {
+static bool point_input_read(lv_indev_drv_t * drv, lv_indev_data_t*data) {
     memcpy(data, drv->user_data, sizeof(lv_indev_data_t));
     // if (((lv_indev_data_t*)drv->user_data)->state == LV_INDEV_STATE_PR){
     //     ((lv_indev_data_t*)drv->user_data)->state == LV_INDEV_STATE_REL;