Просмотр исходного кода

fix: 完全关闭air640w的wifi功能,也应该能正常编译

Wendal Chen 5 лет назад
Родитель
Сommit
90bbe20d4e

+ 3 - 1
bsp/air640w/rtt/applications/luat_init_w60x.c

@@ -6,6 +6,8 @@
 
 #include "rtthread.h"
 #include <rtdevice.h>
+
+#ifdef RT_USING_WIFI
 #include "wlan_mgnt.h"
 
 #define DBG_TAG           "w60x.init"
@@ -19,4 +21,4 @@ static int rtt_w60x_init() {
 }
 INIT_COMPONENT_EXPORT(rtt_w60x_init);
 #endif
-
+#endif

+ 3 - 0
bsp/air640w/rtt/drivers/drv_wifi.c

@@ -9,6 +9,7 @@
  */
 
 #include <rtthread.h>
+#ifdef RT_USING_WIFI
 #include <wlan_dev.h>
 #include "wm_type_def.h"
 #include "wm_wifi.h"
@@ -628,3 +629,5 @@ int wm_hw_wifi_init(void)
     return ret; //RT_EOK;
 }
 INIT_DEVICE_EXPORT(wm_hw_wifi_init);
+
+#endif

+ 4 - 0
luat/rtt/luat_lib_wlan.c

@@ -9,6 +9,8 @@
 #include "luat_malloc.h"
 #include "rtthread.h"
 
+#ifdef RT_USING_WIFI
+
 #define DBG_TAG           "luat.wlan"
 #define DBG_LVL           DBG_INFO
 #include <rtdbg.h>
@@ -656,3 +658,5 @@ LUAMOD_API int luaopen_wlan( lua_State *L ) {
 }
 
 #endif
+
+#endif

+ 3 - 0
luat/rtt/rtt_airkiss.c

@@ -1,6 +1,7 @@
 #include <rtthread.h>
 #include <rtdevice.h>
 
+#ifdef RT_USING_WIFI
 #ifdef RT_WLAN_MANAGE_ENABLE
 #include <sys/socket.h>
 
@@ -211,3 +212,5 @@ int airkiss_start(void)
 // 几个
 
 #endif
+#endif
+