Przeglądaj źródła

add: 关联ulwip库的编译,准备尝试对接w5500或者ch395

Wendal Chen 1 rok temu
rodzic
commit
ea74450f14
3 zmienionych plików z 10 dodań i 2 usunięć
  1. 3 0
      app/port/luat_base_air101.c
  2. 3 2
      app/port/luat_conf_bsp.h
  3. 4 0
      xmake.lua

+ 3 - 0
app/port/luat_base_air101.c

@@ -201,6 +201,9 @@ static const luaL_Reg loadedlibs[] = {
 #ifdef LUAT_USE_FTP
   {"ftp", luaopen_ftp},
 #endif
+#ifdef LUAT_USE_ULWIP
+  {"ulwip", luaopen_ulwip},
+#endif
 #endif
 #ifdef LUAT_USE_LORA
   {"lora", luaopen_lora},

+ 3 - 2
app/port/luat_conf_bsp.h

@@ -54,6 +54,7 @@
 
 // 外置网络支持
 // #define LUAT_USE_W5500
+// #define LUAT_USE_ULWIP 1
 
 // 开启TLS
 #define LUAT_USE_TLS
@@ -349,7 +350,7 @@
 #endif
 #endif
 
-#if defined(LUAT_USE_WLAN) || defined(LUAT_USE_W5500)
+#if defined(LUAT_USE_WLAN) || defined(LUAT_USE_W5500) || defined(LUAT_USE_ULWIP)
 #ifndef LUAT_USE_NETWORK
 #define LUAT_USE_NETWORK
 #define LUAT_USE_DNS
@@ -358,7 +359,7 @@
 #define LUAT_USE_DNS 1
 #endif
 #endif
-#ifdef LUAT_USE_WLAN
+#if defined(LUAT_USE_WLAN) || defined(LUAT_USE_ULWIP)
 #ifndef LUAT_USE_LWIP
 #define LUAT_USE_LWIP
 #endif

+ 4 - 0
xmake.lua

@@ -398,6 +398,10 @@ target("network")
     add_includedirs(luatos.."components/network/zlink/include",{public = true})
     add_files(luatos.."components/network/zlink/src/*.c")
 
+    -- ulwip
+    -- add_includedirs(luatos.."components/network/ulwip/include",{public = true})
+    add_files(luatos.."components/network/ulwip/**.c")
+
 target_end()
 
 target("nes")