Răsfoiți Sursa

add:添加ftp

Dozingfiretruck 3 ani în urmă
părinte
comite
46dafdb463
3 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 1 0
      application/include/luat_conf_bsp.h
  2. 1 0
      application/src/luat_base_air105.c
  3. 4 0
      xmake.lua

+ 1 - 0
application/include/luat_conf_bsp.h

@@ -84,6 +84,7 @@
 #define LUAT_USE_NETWORK 1
 #define LUAT_USE_TLS 1
 #define LUAT_USE_SNTP 1
+#define LUAT_USE_FTP 1
 
 // #define LUAT_USE_IOTAUTH 1
 #define LUAT_USE_LORA 1

+ 1 - 0
application/src/luat_base_air105.c

@@ -214,6 +214,7 @@ static const luaL_Reg loadedlibs[] = {
   {"socket", luaopen_socket_adapter},
   {"mqtt", luaopen_mqtt},
   {"http", luaopen_http},
+  {"ftp", luaopen_ftp},
 #endif
 // #ifdef LUAT_USE_FOTA
   {"fota", luaopen_fota},

+ 4 - 0
xmake.lua

@@ -421,6 +421,10 @@ if with_luatos then
     -- http_parser
     add_includedirs(luatos.."components/network/http_parser",{public = true})
     add_files(luatos.."components/network/http_parser/*.c")
+    
+    -- libftp
+    add_includedirs(luatos.."components/network/libftp",{public = true})
+    add_files(luatos.."components/network/libftp/*.c")
 
     
     -- http