Ver código fonte

Merge branch 'master' of gitee.com:openLuat/luatos-soc-air101

Wendal Chen 4 anos atrás
pai
commit
5b08610174
4 arquivos alterados com 8 adições e 1 exclusões
  1. 3 0
      app/port/luat_base_air101.c
  2. 1 0
      app/port/luat_conf_bsp.h
  3. 1 1
      app/port/luat_i2c_air101.c
  4. 3 0
      xmake.lua

+ 3 - 0
app/port/luat_base_air101.c

@@ -167,6 +167,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #ifdef LUAT_USE_FONTS
   {"fonts", luaopen_fonts},
+#endif
+#ifdef LUAT_USE_ZLIB
+  {"zlib", luaopen_zlib},
 #endif
   {NULL, NULL}
 };

+ 1 - 0
app/port/luat_conf_bsp.h

@@ -54,6 +54,7 @@
 // #define LUAT_USE_STATEM 1
 // 性能测试,跑完就是玩,不要与lvgl一起启用,生产环境的固件别加这个库
 // #define LUAT_USE_COREMARK 1
+// #define LUAT_USE_ZLIB 
 
 //---------------SDIO-FATFS特别配置
 // sdio库对接的是fatfs

+ 1 - 1
app/port/luat_i2c_air101.c

@@ -41,7 +41,7 @@ int luat_i2c_send(int id, int addr, void* buff, size_t len) {
         if(WM_FAILED == tls_i2c_wait_ack())
             return -1;
     }
-    tls_i2c_stop();
+    // tls_i2c_stop();
     return 0;
 }
 

+ 3 - 0
xmake.lua

@@ -277,6 +277,9 @@ target("air10x")
     add_files(luatos.."components/luatfonts/*.c")
     add_includedirs(luatos.."components/luatfonts")
 
+    add_files(luatos.."luat/packages/zlib/*.c")
+    add_includedirs(luatos.."luat/packages/zlib")
+
     -- add_files(luatos.."components/mlx90640-library/*.c")
     -- del_files(luatos.."components/mlx90640-library/MLX90640_I2C_Driver.c")
     -- add_includedirs(luatos.."components/mlx90640-library")