Kaynağa Gözat

fix: idf5编译错误,原因是缺luat_msgbus_is_empty函数

Wendal Chen 2 yıl önce
ebeveyn
işleme
a4a1bf408d
2 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 1 1
      lua/src/lmem.c
  2. 3 0
      luat/freertos/luat_msgbus_freertos.c

+ 1 - 1
lua/src/lmem.c

@@ -21,7 +21,7 @@
 #include "lobject.h"
 #include "lstate.h"
 
-
+#include "luat_malloc.h"
 
 /*
 ** About the realloc function:

+ 3 - 0
luat/freertos/luat_msgbus_freertos.c

@@ -30,3 +30,6 @@ uint32_t luat_msgbus_freesize(void) {
     return 1;
 }
 
+uint8_t luat_msgbus_is_empty(void) {
+    return uxQueueMessagesWaiting(xQueue) == 0 ? 1 : 0;
+}