lwip: handle CONFIG_VFS_SUPPORT_IO=n and CONFIG_VFS_SUPPORT_SELECT=n

* If CONFIG_VFS_SUPPORT_IO=y, keep everything as it is now
* If CONFIG_VFS_SUPPORT_IO=n, defined syscalls which LwIP can
  implement, such as read/write/close
* Make LWIP-only select implementation dependent on
  CONFIG_VFS_SUPPORT_SELECT, deprecate CONFIG_LWIP_USE_ONLY_LWIP_SELECT
This commit is contained in:
Ivan Grokhotkov
2020-03-20 14:03:44 +01:00
parent cadab2cbcf
commit b203ac7b02
5 changed files with 116 additions and 5 deletions
+6 -1
View File
@@ -85,7 +85,6 @@ set(srcs
"lwip/src/netif/ppp/upap.c"
"lwip/src/netif/ppp/utils.c"
"lwip/src/netif/ppp/vj.c"
"port/esp32/vfs_lwip.c"
"port/esp32/debug/lwip_debug.c"
"port/esp32/freertos/sys_arch.c"
"port/esp32/netif/dhcp_state.c"
@@ -129,6 +128,12 @@ if(CONFIG_ETH_ENABLED)
list(APPEND srcs "port/esp32/netif/ethernetif.c")
endif()
if(CONFIG_VFS_SUPPORT_IO)
list(APPEND srcs "port/esp32/vfs_lwip.c")
else()
list(APPEND srcs "port/esp32/no_vfs_syscalls.c")
endif()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS linker.lf