Răsfoiți Sursa

add:部分luat_rtos函数,启用miniz,关闭zlib

alienwalker 3 ani în urmă
părinte
comite
2d9e66ade7

+ 4 - 2
application/include/luat_conf_bsp.h

@@ -60,7 +60,7 @@
 // #define LUAT_USE_STATEM 1
 // #define LUAT_USE_COREMARK 1
 #define LUAT_USE_FDB 1
-#define LUAT_USE_ZLIB 
+//#define LUAT_USE_ZLIB
 #define LUAT_USE_CAMERA  1
 #define LUAT_USE_FATFS 1
 #define LUAT_USE_I2CTOOLS 1
@@ -72,6 +72,8 @@
 #define LUAT_USE_NETWORK 1
 #define LUAT_USE_TLS 1
 #define LUAT_USE_LORA 1
+// #define LUAT_USE_MLX90640 1
+#define LUAT_USE_MINIZ 1
 
 //----------------------------
 // 高通字体, 需配合芯片使用
@@ -102,7 +104,7 @@
 #define LUAT_USE_U8G2  1
 
 /**************FONT*****************/
-#define LUAT_USE_FONTS
+#define LUAT_USE_FONTS  1
 /**********U8G2&LCD&EINK FONT*************/
 #define USE_U8G2_OPPOSANSM_ENGLISH 1
 #define USE_U8G2_OPPOSANSM12_CHINESE

+ 4 - 0
application/src/luat_base_air105.c

@@ -205,6 +205,7 @@ static const luaL_Reg loadedlibs[] = {
 #ifdef LUAT_USE_W5500
   {"w5500", luaopen_w5500},
   {"network", luaopen_network_adapter},
+  {"mqtt", luaopen_mqtt},
 #endif
 // #ifdef LUAT_USE_FOTA
   {"fota", luaopen_fota},
@@ -217,6 +218,9 @@ static const luaL_Reg loadedlibs[] = {
 #endif
 #ifdef LUAT_USE_MLX90640
   {"mlx90640", luaopen_mlx90640},
+#endif
+#ifdef LUAT_USE_MINIZ
+  {"miniz", luaopen_miniz},
 #endif
   {"usbapp", luaopen_usbapp},
   {"audio", luaopen_multimedia_audio},

+ 1 - 1
application/src/luat_crypto_air105.c

@@ -27,7 +27,7 @@
 
 #define LUAT_LOG_TAG "crypto"
 #include "luat_log.h"
-#include "mbedtls/config.h"
+//#include "mbedtls/config.h"
 #include "mbedtls/cipher.h"
 #include "mbedtls/sha1.h"
 #include "mbedtls/sha256.h"

+ 20 - 0
application/src/luat_rtos_air105.c

@@ -75,3 +75,23 @@ void luat_task_resume_all(void)
 {
 	OS_ResumeTask(NULL);
 }
+
+
+void *luat_mutex_create(void)
+{
+	return OS_MutexCreateUnlock();
+}
+LUAT_RET luat_mutex_lock(void *mutex)
+{
+	OS_MutexLock(mutex);
+	return 0;
+}
+LUAT_RET luat_mutex_unlock(void *mutex)
+{
+	OS_MutexRelease(mutex);
+	return 0;
+}
+void luat_mutex_release(void *mutex)
+{
+	OS_MutexDelete(mutex);
+}