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

change: pc模拟器, 尝试修复macos编译兼容性

https://github.com/openLuat/LuatOS/issues/118
Wendal Chen 3 месяцев назад
Родитель
Сommit
d8e2db557e
2 измененных файлов с 8 добавлено и 0 удалено
  1. 4 0
      bsp/pc/include/luat_conf_bsp.h
  2. 4 0
      bsp/pc/port/luat_mobile_pc.c

+ 4 - 0
bsp/pc/include/luat_conf_bsp.h

@@ -249,4 +249,8 @@
 #define LUAT_UART_MAX_DEVICE_COUNT 128
 #define LUAT_USE_PSRAM 1
 
+#ifndef LUAT_USE_LWIP
+#undef LUAT_USE_MOBILE
+#endif
+
 #endif

+ 4 - 0
bsp/pc/port/luat_mobile_pc.c

@@ -4,7 +4,9 @@
 #include "luat_str.h"
 #include "luat_mcu.h"
 #include "luat_crypto.h"
+#ifdef LUAT_USE_LWIP
 #include "lwip/ip_addr.h"
+#endif
 
 // #define LUAT_LOG_TAG "mobile"
 
@@ -151,10 +153,12 @@ int luat_mobile_get_flymode(int index)
 {
     return 0;
 }
+#ifdef LUAT_USE_LWIP
 int luat_mobile_get_local_ip(int sim_id, int cid, ip_addr_t *ip_v4, ip_addr_t *ip_v6)
 {
     return 0;
 }
+#endif
 int luat_mobile_get_cell_info(luat_mobile_cell_info_t  *info)
 {
     return 0;