aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-24 16:28:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-24 16:28:15 +0000
commitf914a905566ed97b414c4475a22ff8a7a6f222a0 (patch)
treea51180fd3fd067bdba947fe6b9ba9797db0e2ba7 /apps
parentad65a046170ddff04e8257597197b3df758fa0a9 (diff)
downloadpx4-firmware-f914a905566ed97b414c4475a22ff8a7a6f222a0.tar.gz
px4-firmware-f914a905566ed97b414c4475a22ff8a7a6f222a0.tar.bz2
px4-firmware-f914a905566ed97b414c4475a22ff8a7a6f222a0.zip
apps/examples/nettest and poll: Complete Kconfig files
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5556 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r--apps/ChangeLog.txt1
-rw-r--r--apps/examples/README.txt4
-rw-r--r--apps/examples/nettest/Kconfig43
-rw-r--r--apps/examples/nettest/Makefile2
-rw-r--r--apps/examples/nettest/nettest.h4
-rw-r--r--apps/examples/poll/Kconfig18
6 files changed, 67 insertions, 5 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index bcc0ac172..5f3440897 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -492,3 +492,4 @@
the entrypoint. Should be ftpd_main (from Yan T.)
* apps/netutils/telnetd/telnetd_driver: Was stuck in a loop if
recv[from]() ever returned a value <= 0.
+ * apps/examples/nettest and poll: Complete Kconfig files.
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 5996cbb70..03d43f1a0 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -675,8 +675,8 @@ examples/mount
when CONFIG_EXAMPLES_MOUNT_DEVNAME is not defined. The
default is zero (meaning that "/dev/ram0" will be used).
-examples/netttest
-^^^^^^^^^^^^^^^^^
+examples/nettest
+^^^^^^^^^^^^^^^^
This is a simple network test for verifying client- and server-
functionality in a TCP/IP connection.
diff --git a/apps/examples/nettest/Kconfig b/apps/examples/nettest/Kconfig
index 63d34ec3f..613b8ea91 100644
--- a/apps/examples/nettest/Kconfig
+++ b/apps/examples/nettest/Kconfig
@@ -6,8 +6,51 @@
config EXAMPLES_NETTEST
bool "Network test example"
default n
+ depends on NET_TCP
---help---
Enable the network test example
if EXAMPLES_NETTEST
+
+config EXAMPLES_NETTEST_SERVER
+ bool "Target is server"
+ default n
+ ---help---
+ Select to use the host as the client side of the test. Default: The
+ target is the client side of the test
+
+config EXAMPLES_NETTEST_PERFORMANCE
+ bool "Test for Performance"
+ default n
+ ---help---
+ Configure the example to test for network performance. Default: Test
+ is for network functionality.
+
+config EXAMPLES_NETTEST_NOMAC
+ bool "Use Canned MAC Address"
+ default n
+
+config EXAMPLES_NETTEST_IPADDR
+ hex "Target IP address"
+ default 0x0a000002
+
+config EXAMPLES_NETTEST_DRIPADDR
+ hex "Default Router IP address (Gateway)"
+ default 0x0a000001
+
+config EXAMPLES_NETTEST_NETMASK
+ hex "Network Mask"
+ default 0xffffff00
+
+config EXAMPLES_NETTEST_CLIENTIP
+ hex "Client IP Address"
+ default 0x0a000001 if !EXAMPLES_NETTEST_SERVER
+ default 0x0a000002 if EXAMPLES_NETTEST_SERVER
+ ---help---
+ IP address of the client. If the target is the client, then
+ EXAMPLES_NETTEST_CLIENTIP should be the same as
+ EXAMPLES_NETTEST_IPADDR (default). If the target is the server,
+ then the default value of EXAMPLES_NETTEST_CLIENTIP is set to the
+ gateway address, EXAMPLES_NETTEST_DRIPADDR.
+
endif
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile
index 5368bdefc..c533c9dd5 100644
--- a/apps/examples/nettest/Makefile
+++ b/apps/examples/nettest/Makefile
@@ -64,7 +64,7 @@ else
endif
endif
-HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_HOST=1
+HOSTCFLAGS += -DNETTEST_HOST=1
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_SERVER=1 -DCONFIG_EXAMPLES_NETTEST_CLIENTIP="$(CONFIG_EXAMPLES_NETTEST_CLIENTIP)"
endif
diff --git a/apps/examples/nettest/nettest.h b/apps/examples/nettest/nettest.h
index f05038584..37ac470d1 100644
--- a/apps/examples/nettest/nettest.h
+++ b/apps/examples/nettest/nettest.h
@@ -40,7 +40,7 @@
* Included Files
****************************************************************************/
-#ifdef CONFIG_EXAMPLES_NETTEST_HOST
+#ifdef NETTEST_HOST
#else
# include <debug.h>
#endif
@@ -49,7 +49,7 @@
* Definitions
****************************************************************************/
-#ifdef CONFIG_EXAMPLES_NETTEST_HOST
+#ifdef NETTEST_HOST
/* HTONS/L macros are unique to uIP */
# define HTONS(a) htons(a)
diff --git a/apps/examples/poll/Kconfig b/apps/examples/poll/Kconfig
index c52827496..f35a9200b 100644
--- a/apps/examples/poll/Kconfig
+++ b/apps/examples/poll/Kconfig
@@ -6,8 +6,26 @@
config EXAMPLES_POLL
bool "Poll example"
default n
+ depends on !NSH_BUILTIN_APPS
---help---
Enable the poll example
if EXAMPLES_POLL
+
+config EXAMPLES_POLL_NOMAC
+ bool "Use Canned MAC Address"
+ default n
+
+config EXAMPLES_POLL_IPADDR
+ hex "Target IP address"
+ default 0x0a000002
+
+config EXAMPLES_POLL_DRIPADDR
+ hex "Default Router IP address (Gateway)"
+ default 0x0a000001
+
+config EXAMPLES_POLL_NETMASK
+ hex "Network Mask"
+ default 0xffffff00
+
endif