Selaa lähdekoodia

add: 接口文档生成,适配多文件分散开的接口

chenxuuu 4 vuotta sitten
vanhempi
sitoutus
7b79cfff8c

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_anim.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 #include "luat_base.h"
 #include "luat_lvgl.h"
 #include "lvgl.h"

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_cb.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 
 #include "luat_base.h"
 #include "luat_msgbus.h"

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_font.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 #include "luat_base.h"
 #include "luat_lvgl.h"
 #include "lvgl.h"

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_gif.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 #include "luat_base.h"
 #include "luat_lvgl.h"
 #include "lvgl.h"

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_qrcode.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 
 #include "luat_base.h"
 #include "luat_lvgl.h"

+ 7 - 0
components/lvgl/binding/luat_lib_lvgl_style.c

@@ -1,3 +1,10 @@
+/*
+@module  lvgl
+@summary LVGL图像库
+@version 1.0
+@date    2021.06.01
+*/
+
 #include "luat_base.h"
 #include "luat_lvgl.h"
 #include "lvgl.h"

+ 10 - 0
tools/documentGenerator.py

@@ -29,6 +29,11 @@ for home, dirs, files in os.walk(source_path+"/../lua"):
         if filename.endswith(".c"):
             file_list.append(os.path.join(home, filename))
 
+for home, dirs, files in os.walk(source_path+"/../components"):
+    for filename in files:
+        if filename.endswith(".c"):
+            file_list.append(os.path.join(home, filename))
+
 #注释的格式:
 # /*
 # @module  模块的调用名
@@ -118,6 +123,11 @@ for file in file_list:
     else:
         continue
 
+    for mstep in range(len(modules)-1,-1,-1):
+        if modules[mstep]["module"] == module["module"]:
+            module["api"] = modules[mstep]["api"]
+            del modules[mstep]
+
     #后面的数据
     lines = text.splitlines()
     line_now = 0