Quellcode durchsuchen

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

Wendal Chen vor 2 Jahren
Ursprung
Commit
a4a1bf408d
2 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  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;
+}