summaryrefslogtreecommitdiff
path: root/apps/examples/udp
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-04 17:36:07 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-04 17:36:07 +0000
commitd0c91546343d545c11c10f7d29d1c06175c1109a (patch)
tree64bb2a8bfc5fdae5e8a88464b3b89054f602259e /apps/examples/udp
parentf096e07fceb776545fa7b06501dc734ad0e81783 (diff)
downloadnuttx-d0c91546343d545c11c10f7d29d1c06175c1109a.tar.gz
nuttx-d0c91546343d545c11c10f7d29d1c06175c1109a.tar.bz2
nuttx-d0c91546343d545c11c10f7d29d1c06175c1109a.zip
Change all occurrences of CONFIG_EXAMPLE_ to CONFIG_EXAMPLES_ for consistency; fleshed out a few more Kconfig files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5211 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/udp')
-rw-r--r--apps/examples/udp/Makefile12
-rw-r--r--apps/examples/udp/host.c2
-rw-r--r--apps/examples/udp/target.c8
-rw-r--r--apps/examples/udp/udp-client.c2
-rw-r--r--apps/examples/udp/udp-internal.h4
5 files changed, 14 insertions, 14 deletions
diff --git a/apps/examples/udp/Makefile b/apps/examples/udp/Makefile
index 337d323e8..17438321c 100644
--- a/apps/examples/udp/Makefile
+++ b/apps/examples/udp/Makefile
@@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
TARG_ASRCS =
TARG_CSRCS = target.c
-ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
+ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
TARG_CSRCS += udp-server.c
else
TARG_CSRCS += udp-client.c
@@ -60,14 +60,14 @@ else
TARG_BIN = "$(APPDIR)/libapps$(LIBEXT)"
endif
-HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_HOST=1
-ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
-HOSTCFLAGS += -DCONFIG_EXAMPLE_UDP_SERVER=1 \
- -DCONFIG_EXAMPLE_UDP_SERVERIP="$(CONFIG_EXAMPLE_UDP_SERVERIP)"
+HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_HOST=1
+ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
+HOSTCFLAGS += -DCONFIG_EXAMPLES_UDP_SERVER=1 \
+ -DCONFIG_EXAMPLES_UDP_SERVERIP="$(CONFIG_EXAMPLES_UDP_SERVERIP)"
endif
HOST_SRCS = host.c
-ifeq ($(CONFIG_EXAMPLE_UDP_SERVER),y)
+ifeq ($(CONFIG_EXAMPLES_UDP_SERVER),y)
HOST_SRCS += udp-client.c
else
HOST_SRCS += udp-server.c
diff --git a/apps/examples/udp/host.c b/apps/examples/udp/host.c
index 9d2aa73d9..e103acd8c 100644
--- a/apps/examples/udp/host.c
+++ b/apps/examples/udp/host.c
@@ -53,7 +53,7 @@
int main(int argc, char **argv, char **envp)
{
-#ifdef CONFIG_EXAMPLE_UDP_SERVER
+#ifdef CONFIG_EXAMPLES_UDP_SERVER
send_client();
#else
recv_server();
diff --git a/apps/examples/udp/target.c b/apps/examples/udp/target.c
index e43ff2a0b..d7b64638d 100644
--- a/apps/examples/udp/target.c
+++ b/apps/examples/udp/target.c
@@ -68,20 +68,20 @@ int udp_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_NETMASK);
uip_setnetmask("eth0", &addr);
-#ifdef CONFIG_EXAMPLE_UDP_SERVER
+#ifdef CONFIG_EXAMPLES_UDP_SERVER
recv_server();
#else
send_client();
diff --git a/apps/examples/udp/udp-client.c b/apps/examples/udp/udp-client.c
index fb98ab342..6b8473582 100644
--- a/apps/examples/udp/udp-client.c
+++ b/apps/examples/udp/udp-client.c
@@ -102,7 +102,7 @@ void send_client(void)
server.sin_family = AF_INET;
server.sin_port = HTONS(PORTNO);
- server.sin_addr.s_addr = HTONL(CONFIG_EXAMPLE_UDP_SERVERIP);
+ server.sin_addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_SERVERIP);
message("client: %d. Sending %d bytes\n", offset, SENDSIZE);
nbytes = sendto(sockfd, outbuf, SENDSIZE, 0,
diff --git a/apps/examples/udp/udp-internal.h b/apps/examples/udp/udp-internal.h
index 04a685d17..2a966c746 100644
--- a/apps/examples/udp/udp-internal.h
+++ b/apps/examples/udp/udp-internal.h
@@ -40,7 +40,7 @@
* Included Files
****************************************************************************/
-#ifdef CONFIG_EXAMPLE_UDP_HOST
+#ifdef CONFIG_EXAMPLES_UDP_HOST
#else
# include <debug.h>
#endif
@@ -49,7 +49,7 @@
* Definitions
****************************************************************************/
-#ifdef CONFIG_EXAMPLE_UDP_HOST
+#ifdef CONFIG_EXAMPLES_UDP_HOST
/* HTONS/L macros are unique to uIP */
# define HTONS(a) htons(a)