瀏覽代碼

Merge branch 'feature/lwip-rcvbuf-option' into 'master'

add menuconfig option to enable SO_RCVBUF

This option is required by Arduino and enables netconn connection to be queried for amount of data available in the rx buffer.

See merge request !372

Ivan Grokhotkov 9 年之前
父節點
當前提交
0efaa4f4b8
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 6 0
      components/lwip/Kconfig
  2. 1 1
      components/lwip/include/lwip/port/lwipopts.h

+ 6 - 0
components/lwip/Kconfig

@@ -40,6 +40,12 @@ config LWIP_SO_REUSE
         Enabling this option allows binding to a port which remains in
         Enabling this option allows binding to a port which remains in
         TIME_WAIT.
         TIME_WAIT.
 
 
+config LWIP_SO_RCVBUF
+    bool "Enable SO_RCVBUF option"
+    default 0
+    help
+        Enabling this option allows checking for available data on a netconn.
+
 config LWIP_DHCP_MAX_NTP_SERVERS
 config LWIP_DHCP_MAX_NTP_SERVERS
 	int	"Maximum number of NTP servers"
 	int	"Maximum number of NTP servers"
 	default 1
 	default 1

+ 1 - 1
components/lwip/include/lwip/port/lwipopts.h

@@ -440,7 +440,7 @@
 /**
 /**
  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
  * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
  */
  */
-#define LWIP_SO_RCVBUF                  0
+#define LWIP_SO_RCVBUF                  CONFIG_LWIP_SO_RCVBUF
 
 
 /**
 /**
  * SO_REUSE==1: Enable SO_REUSEADDR option.
  * SO_REUSE==1: Enable SO_REUSEADDR option.