summaryrefslogtreecommitdiff
path: root/apps
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
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')
-rw-r--r--apps/ChangeLog.txt4
-rw-r--r--apps/examples/Make.defs2
-rw-r--r--apps/examples/README.txt110
-rw-r--r--apps/examples/adc/Kconfig24
-rw-r--r--apps/examples/adc/adc_main.c14
-rw-r--r--apps/examples/buttons/buttons_main.c88
-rw-r--r--apps/examples/dhcpd/target.c22
-rw-r--r--apps/examples/discover/Kconfig22
-rw-r--r--apps/examples/discover/discover_main.c22
-rw-r--r--apps/examples/ftpd/ftpd.h26
-rw-r--r--apps/examples/ftpd/ftpd_main.c10
-rw-r--r--apps/examples/igmp/igmp.c16
-rw-r--r--apps/examples/nettest/Makefile16
-rw-r--r--apps/examples/nettest/host.c2
-rw-r--r--apps/examples/nettest/nettest.c12
-rw-r--r--apps/examples/nettest/nettest.h4
-rw-r--r--apps/examples/nettest/nettest_client.c14
-rw-r--r--apps/examples/nettest/nettest_server.c4
-rw-r--r--apps/examples/poll/net_listener.c10
-rw-r--r--apps/examples/poll/net_reader.c10
-rw-r--r--apps/examples/sendmail/target.c46
-rw-r--r--apps/examples/telnetd/shell.c10
-rw-r--r--apps/examples/telnetd/shell.h20
-rw-r--r--apps/examples/thttpd/thttpd_main.c10
-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
-rw-r--r--apps/examples/uip/uip_main.c20
-rw-r--r--apps/examples/wget/Kconfig24
-rw-r--r--apps/examples/wget/target.c24
-rw-r--r--apps/examples/wlan/wlan_main.c18
33 files changed, 346 insertions, 286 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 0e63d183e..397ccdac4 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -358,3 +358,7 @@
context is established first. If the namedapp context is established
later, it will overwrite any existing namedapp_list.h and nameapp_proto.h
files.
+ * CONFIG_EXAMPLES_*: To make things consistent, changed all occurrences
+ of CONFIG_EXAMPLE_* to CONFIG_EXAMPLES_*.
+ * Kconfig: Fleshed out apps/examples/adc/Kconfig and apps/examples/wget/Kconfig.
+ There are still a LOT of empty, stub Kconfig files.
diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs
index e6b1f3ca3..d03b976d2 100644
--- a/apps/examples/Make.defs
+++ b/apps/examples/Make.defs
@@ -58,7 +58,7 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y)
CONFIGURED_APPS += examples/dhcpd
endif
-ifeq ($(CONFIG_EXAMPLE_DISCOVER),y)
+ifeq ($(CONFIG_EXAMPLES_DISCOVER),y)
CONFIGURED_APPS += examples/discover
endif
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 12d6d3892..7ef51025f 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -61,19 +61,19 @@ examples/buttons
specific button interfaces. Configuration options:
CONFIG_ARCH_BUTTONS - Must be defined for button support
- CONFIG_EXAMPLE_BUTTONS_MIN - Lowest button number (MIN=0)
- CONFIG_EXAMPLE_BUTTONS_MAX - Highest button number (MAX=7)
+ CONFIG_EXAMPLES_BUTTONS_MIN - Lowest button number (MIN=0)
+ CONFIG_EXAMPLES_BUTTONS_MAX - Highest button number (MAX=7)
CONFIG_ARCH_IRQBUTTONS - Must be defined for interrupting button support
- CONFIG_EXAMPLE_IRQBUTTONS_MIN - Lowest interrupting button number (MIN=0)
- CONFIG_EXAMPLE_IRQBUTTONS_MAX - Highest interrupting button number (MAX=7)
+ CONFIG_EXAMPLES_IRQBUTTONS_MIN - Lowest interrupting button number (MIN=0)
+ CONFIG_EXAMPLES_IRQBUTTONS_MAX - Highest interrupting button number (MAX=7)
Name strings for buttons:
- CONFIG_EXAMPLE_BUTTONS_NAME0, CONFIG_EXAMPLE_BUTTONS_NAME1,
- CONFIG_EXAMPLE_BUTTONS_NAME2, CONFIG_EXAMPLE_BUTTONS_NAME3,
- CONFIG_EXAMPLE_BUTTONS_NAME4, CONFIG_EXAMPLE_BUTTONS_NAME5,
- CONFIG_EXAMPLE_BUTTONS_NAME6, CONFIG_EXAMPLE_BUTTONS_NAME7,
+ CONFIG_EXAMPLES_BUTTONS_NAME0, CONFIG_EXAMPLES_BUTTONS_NAME1,
+ CONFIG_EXAMPLES_BUTTONS_NAME2, CONFIG_EXAMPLES_BUTTONS_NAME3,
+ CONFIG_EXAMPLES_BUTTONS_NAME4, CONFIG_EXAMPLES_BUTTONS_NAME5,
+ CONFIG_EXAMPLES_BUTTONS_NAME6, CONFIG_EXAMPLES_BUTTONS_NAME7,
Additional architecture-/board- specific configuration settings may also
be required.
@@ -260,10 +260,10 @@ examples/dhcpd
configuration settings)
CONFIG_NET_BROADCAST=y - UDP broadcast support is needed.
- CONFIG_EXAMPLE_DHCPD_NOMAC - (May be defined to use software assigned MAC)
- CONFIG_EXAMPLE_DHCPD_IPADDR - Target IP address
- CONFIG_EXAMPLE_DHCPD_DRIPADDR - Default router IP addess
- CONFIG_EXAMPLE_DHCPD_NETMASK - Network mask
+ CONFIG_EXAMPLES_DHCPD_NOMAC - (May be defined to use software assigned MAC)
+ CONFIG_EXAMPLES_DHCPD_IPADDR - Target IP address
+ CONFIG_EXAMPLES_DHCPD_DRIPADDR - Default router IP addess
+ CONFIG_EXAMPLES_DHCPD_NETMASK - Network mask
See also CONFIG_NETUTILS_DHCPD_* settings described elsewhere
and used in netutils/dhcpd/dhcpd.c. These settings are required
@@ -291,11 +291,11 @@ examples/discover
NuttX configuration settings:
- CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client
- CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address
- CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address
- CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address
- CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask
+ CONFIG_EXAMPLES_DISCOVER_DHCPC - DHCP Client
+ CONFIG_EXAMPLES_DISCOVER_NOMAC - Use canned MAC address
+ CONFIG_EXAMPLES_DISCOVER_IPADDR - Target IP address
+ CONFIG_EXAMPLES_DISCOVER_DRIPADDR - Router IP address
+ CONFIG_EXAMPLES_DISCOVER_NETMASK - Network Mask
examples/ftpc
^^^^^^^^^^^^^
@@ -367,12 +367,12 @@ examples/ftpd
If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
be specified to customized the network configuration:
- CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its
+ CONFIG_EXAMPLES_FTPD_NOMAC - If the hardware has no MAC address of its
own, define this =y to provide a bogus address for testing.
- CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2
- CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default
+ CONFIG_EXAMPLES_FTPD_IPADDR - The target IP address. Default 10.0.0.2
+ CONFIG_EXAMPLES_FTPD_DRIPADDR - The default router address. Default
10.0.0.1
- CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0
+ CONFIG_EXAMPLES_FTPD_NETMASK - The network mask. Default: 255.255.255.0
Other required configuration settings: Of course TCP networking support
is required. But here are a couple that are less obvious:
@@ -465,15 +465,15 @@ examples/igmp
does not do much of value -- Much more is needed in order to verify
the IGMP features!
- * CONFIG_EXAMPLE_IGMP_NOMAC
+ * CONFIG_EXAMPLES_IGMP_NOMAC
Set if the hardware has no MAC address; one will be assigned
- * CONFIG_EXAMPLE_IGMP_IPADDR
+ * CONFIG_EXAMPLES_IGMP_IPADDR
Target board IP address
- * CONFIG_EXAMPLE_IGMP_DRIPADDR
+ * CONFIG_EXAMPLES_IGMP_DRIPADDR
Default router address
- * CONFIG_EXAMPLE_IGMP_NETMASK
+ * CONFIG_EXAMPLES_IGMP_NETMASK
Network mask
- * CONFIG_EXAMPLE_IGMP_GRPADDR
+ * CONFIG_EXAMPLES_IGMP_GRPADDR
Multicast group address
Applications using this example will need to provide an appconfig
@@ -1023,10 +1023,10 @@ examples/poll
CONFIG_NSOCKET_DESCRIPTORS - Defined to be greater than 0
CONFIG_NET_NTCP_READAHEAD_BUFFERS - Defined to be greater than zero
- CONFIG_EXAMPLE_POLL_NOMAC - (May be defined to use software assigned MAC)
- CONFIG_EXAMPLE_POLL_IPADDR - Target IP address
- CONFIG_EXAMPLE_POLL_DRIPADDR - Default router IP addess
- CONFIG_EXAMPLE_POLL_NETMASK - Network mask
+ CONFIG_EXAMPLES_POLL_NOMAC - (May be defined to use software assigned MAC)
+ CONFIG_EXAMPLES_POLL_IPADDR - Target IP address
+ CONFIG_EXAMPLES_POLL_DRIPADDR - Default router IP addess
+ CONFIG_EXAMPLES_POLL_NETMASK - Network mask
In order to for select to work with incoming connections, you
must also select:
@@ -1163,14 +1163,14 @@ examples/sendmail
Settings unique to this example include:
- CONFIG_EXAMPLE_SENDMAIL_NOMAC - May be defined to use software assigned MAC (optional)
- CONFIG_EXAMPLE_SENDMAIL_IPADDR - Target IP address (required)
- CONFIG_EXAMPLE_SENDMAIL_DRIPADDR - Default router IP addess (required)
- CONFIG_EXAMPLE_SENDMAILT_NETMASK - Network mask (required)
- CONFIG_EXAMPLE_SENDMAIL_RECIPIENT - The recipient of the email (required)
- CONFIG_EXAMPLE_SENDMAIL_SENDER - Optional. Default: "nuttx-testing@example.com"
- CONFIG_EXAMPLE_SENDMAIL_SUBJECT - Optional. Default: "Testing SMTP from NuttX"
- CONFIG_EXAMPLE_SENDMAIL_BODY - Optional. Default: "Test message sent by NuttX"
+ CONFIG_EXAMPLES_SENDMAIL_NOMAC - May be defined to use software assigned MAC (optional)
+ CONFIG_EXAMPLES_SENDMAIL_IPADDR - Target IP address (required)
+ CONFIG_EXAMPLES_SENDMAIL_DRIPADDR - Default router IP addess (required)
+ CONFIG_EXAMPLES_SENDMAILT_NETMASK - Network mask (required)
+ CONFIG_EXAMPLES_SENDMAIL_RECIPIENT - The recipient of the email (required)
+ CONFIG_EXAMPLES_SENDMAIL_SENDER - Optional. Default: "nuttx-testing@example.com"
+ CONFIG_EXAMPLES_SENDMAIL_SUBJECT - Optional. Default: "Testing SMTP from NuttX"
+ CONFIG_EXAMPLES_SENDMAIL_BODY - Optional. Default: "Test message sent by NuttX"
NOTE: This test has not been verified on the NuttX target environment.
As of this writing, unit-tested in the Cygwin/Linux host environment.
@@ -1213,12 +1213,12 @@ examples/telnetd
Default: SCHED_PRIORITY_DEFAULT
CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
Telnet client. Default: 2048
- CONFIG_EXAMPLE_TELNETD_NOMAC - If the hardware has no MAC address of its
+ CONFIG_EXAMPLES_TELNETD_NOMAC - If the hardware has no MAC address of its
own, define this =y to provide a bogus address for testing.
- CONFIG_EXAMPLE_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
- CONFIG_EXAMPLE_TELNETD_DRIPADDR - The default router address. Default
+ CONFIG_EXAMPLES_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
+ CONFIG_EXAMPLES_TELNETD_DRIPADDR - The default router address. Default
10.0.0.1
- CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
+ CONFIG_EXAMPLES_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
The appconfig file (apps/.config) should include:
@@ -1240,9 +1240,9 @@ examples/thttpd
CGI programs. see configs/README.txt for most THTTPD settings.
In addition to those, this example accepts:
- CONFIG_EXAMPLE_THTTPD_NOMAC - (May be defined to use software assigned MAC)
- CONFIG_EXAMPLE_THTTPD_DRIPADDR - Default router IP addess
- CONFIG_EXAMPLE_THTTPD_NETMASK - Network mask
+ CONFIG_EXAMPLES_THTTPD_NOMAC - (May be defined to use software assigned MAC)
+ CONFIG_EXAMPLES_THTTPD_DRIPADDR - Default router IP addess
+ CONFIG_EXAMPLES_THTTPD_NETMASK - Network mask
Applications using this example will need to provide an appconfig
file in the configuration directory with instruction to build applications
@@ -1335,11 +1335,11 @@ examples/uip
This is a port of uIP tiny webserver example application. Settings
specific to this example include:
- CONFIG_EXAMPLE_UIP_NOMAC - (May be defined to use software assigned MAC)
- CONFIG_EXAMPLE_UIP_IPADDR - Target IP address
- CONFIG_EXAMPLE_UIP_DRIPADDR - Default router IP addess
- CONFIG_EXAMPLE_UIP_NETMASK - Network mask
- CONFIG_EXAMPLE_UIP_DHCPC - Select to get IP address via DHCP
+ CONFIG_EXAMPLES_UIP_NOMAC - (May be defined to use software assigned MAC)
+ CONFIG_EXAMPLES_UIP_IPADDR - Target IP address
+ CONFIG_EXAMPLES_UIP_DRIPADDR - Default router IP addess
+ CONFIG_EXAMPLES_UIP_NETMASK - Network mask
+ CONFIG_EXAMPLES_UIP_DHCPC - Select to get IP address via DHCP
If you use DHCPC, then some special configuration network options are
required. These include:
@@ -1637,11 +1637,11 @@ examples/wget
A simple web client example. It will obtain a file from a server using the HTTP
protocol. Settings unique to this example include:
- CONFIG_EXAMPLE_WGET_URL - The URL of the file to get
- CONFIG_EXAMPLE_WGET_NOMAC - (May be defined to use software assigned MAC)
- CONFIG_EXAMPLE_WGET_IPADDR - Target IP address
- CONFIG_EXAMPLE_WGET_DRIPADDR - Default router IP addess
- CONFIG_EXAMPLE_WGET_NETMASK - Network mask
+ CONFIG_EXAMPLES_WGET_URL - The URL of the file to get
+ CONFIG_EXAMPLES_WGET_NOMAC - (May be defined to use software assigned MAC)
+ CONFIG_EXAMPLES_WGET_IPADDR - Target IP address
+ CONFIG_EXAMPLES_WGET_DRIPADDR - Default router IP addess
+ CONFIG_EXAMPLES_WGET_NETMASK - Network mask
This example uses netutils/webclient. Additional configuration settings apply
to that code as follows (but built-in defaults are probably OK):
diff --git a/apps/examples/adc/Kconfig b/apps/examples/adc/Kconfig
index b6dca047c..85c875deb 100644
--- a/apps/examples/adc/Kconfig
+++ b/apps/examples/adc/Kconfig
@@ -6,8 +6,32 @@
config EXAMPLES_ADC
bool "ADC example"
default n
+ depends on ADC
---help---
Enable the ADC example
if EXAMPLES_ADC
+
+config EXAMPLES_ADC_DEVPATH
+ string "ADC device path"
+ default "/dev/adc0"
+ ---help---
+ The default path to the ADC device. Default: /dev/adc0
+
+config EXAMPLES_ADC_NSAMPLES
+ int "Number of Sample Groups"
+ default 0
+ depends on !NSH_BUILTIN_APPS
+ ---help---
+ If NSH_BUILTIN_APPS is defined, then the number of samples is provided
+ on the command line and this value is ignored. Otherwise, this number
+ of samples is collected and the program terminates. Default: 0 (samples
+ are collected indefinitely).
+
+config EXAMPLES_ADC_GROUPSIZE
+ int "Number of Samples per Group"
+ default 4
+ ---help---
+ The number of samples to read at once. Default: 4
+
endif
diff --git a/apps/examples/adc/adc_main.c b/apps/examples/adc/adc_main.c
index 4797265db..404fba8c1 100644
--- a/apps/examples/adc/adc_main.c
+++ b/apps/examples/adc/adc_main.c
@@ -57,6 +57,14 @@
* Pre-processor Definitions
****************************************************************************/
+/* Use CONFIG_EXAMPLES_ADC_NSAMPLES == 0 to mean to collect samples
+ * indefinitely.
+ */
+
+#ifndef CONFIG_EXAMPLES_ADC_NSAMPLES
+# define CONFIG_EXAMPLES_ADC_NSAMPLES 0
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
@@ -249,7 +257,7 @@ int adc_main(int argc, char *argv[])
adc_devpath(&g_adcstate, CONFIG_EXAMPLES_ADC_DEVPATH);
-#ifdef CONFIG_EXAMPLES_ADC_NSAMPLES
+#if CONFIG_EXAMPLES_ADC_NSAMPLES > 0
g_adcstate.count = CONFIG_EXAMPLES_ADC_NSAMPLES;
#else
g_adcstate.count = 1;
@@ -267,7 +275,7 @@ int adc_main(int argc, char *argv[])
* samples that we collect before returning. Otherwise, we never return
*/
-#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_ADC_NSAMPLES)
+#if defined(CONFIG_NSH_BUILTIN_APPS) || CONFIG_EXAMPLES_ADC_NSAMPLES > 0
message("adc_main: g_adcstate.count: %d\n", g_adcstate.count);
#endif
@@ -290,7 +298,7 @@ int adc_main(int argc, char *argv[])
#if defined(CONFIG_NSH_BUILTIN_APPS)
for (; g_adcstate.count > 0; g_adcstate.count--)
-#elif defined(CONFIG_EXAMPLES_ADC_NSAMPLES)
+#elif CONFIG_EXAMPLES_ADC_NSAMPLES > 0
for (g_adcstate.count = 0; g_adcstate.count < CONFIG_EXAMPLES_ADC_NSAMPLES; g_adcstate.count++)
#else
for (;;)
diff --git a/apps/examples/buttons/buttons_main.c b/apps/examples/buttons/buttons_main.c
index a3f6449d4..5f25c1ef1 100644
--- a/apps/examples/buttons/buttons_main.c
+++ b/apps/examples/buttons/buttons_main.c
@@ -61,60 +61,60 @@
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME0
-# define CONFIG_EXAMPLE_BUTTONS_NAME0 "BUTTON0"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME0
+# define CONFIG_EXAMPLES_BUTTONS_NAME0 "BUTTON0"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME1
-# define CONFIG_EXAMPLE_BUTTONS_NAME1 "BUTTON1"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME1
+# define CONFIG_EXAMPLES_BUTTONS_NAME1 "BUTTON1"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME2
-# define CONFIG_EXAMPLE_BUTTONS_NAME2 "BUTTON2"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME2
+# define CONFIG_EXAMPLES_BUTTONS_NAME2 "BUTTON2"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME3
-# define CONFIG_EXAMPLE_BUTTONS_NAME3 "BUTTON3"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME3
+# define CONFIG_EXAMPLES_BUTTONS_NAME3 "BUTTON3"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME4
-# define CONFIG_EXAMPLE_BUTTONS_NAME4 "BUTTON4"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME4
+# define CONFIG_EXAMPLES_BUTTONS_NAME4 "BUTTON4"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME5
-# define CONFIG_EXAMPLE_BUTTONS_NAME5 "BUTTON5"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME5
+# define CONFIG_EXAMPLES_BUTTONS_NAME5 "BUTTON5"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME6
-# define CONFIG_EXAMPLE_BUTTONS_NAME6 "BUTTON6"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME6
+# define CONFIG_EXAMPLES_BUTTONS_NAME6 "BUTTON6"
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_NAME7
-# define CONFIG_EXAMPLE_BUTTONS_NAME7 "BUTTON7"
+#ifndef CONFIG_EXAMPLES_BUTTONS_NAME7
+# define CONFIG_EXAMPLES_BUTTONS_NAME7 "BUTTON7"
#endif
#define BUTTON_MIN 0
#define BUTTON_MAX 7
-#ifndef CONFIG_EXAMPLE_BUTTONS_MIN
-# define CONFIG_EXAMPLE_BUTTONS_MIN BUTTON_MIN
+#ifndef CONFIG_EXAMPLES_BUTTONS_MIN
+# define CONFIG_EXAMPLES_BUTTONS_MIN BUTTON_MIN
#endif
-#ifndef CONFIG_EXAMPLE_BUTTONS_MAX
-# define CONFIG_EXAMPLE_BUTTONS_MAX BUTTON_MAX
+#ifndef CONFIG_EXAMPLES_BUTTONS_MAX
+# define CONFIG_EXAMPLES_BUTTONS_MAX BUTTON_MAX
#endif
-#if CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX
-# error "CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX"
+#if CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX
+# error "CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX"
#endif
-#if CONFIG_EXAMPLE_BUTTONS_MAX > 7
-# error "CONFIG_EXAMPLE_BUTTONS_MAX > 7"
+#if CONFIG_EXAMPLES_BUTTONS_MAX > 7
+# error "CONFIG_EXAMPLES_BUTTONS_MAX > 7"
#endif
-#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MIN
-# define CONFIG_EXAMPLE_IRQBUTTONS_MIN CONFIG_EXAMPLE_BUTTONS_MIN
+#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MIN
+# define CONFIG_EXAMPLES_IRQBUTTONS_MIN CONFIG_EXAMPLES_BUTTONS_MIN
#endif
-#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MAX
-# define CONFIG_EXAMPLE_IRQBUTTONS_MAX CONFIG_EXAMPLE_BUTTONS_MAX
+#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MAX
+# define CONFIG_EXAMPLES_IRQBUTTONS_MAX CONFIG_EXAMPLES_BUTTONS_MAX
#endif
-#if CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX
-# error "CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX"
+#if CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX
+# error "CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX"
#endif
-#if CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7
-# error "CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7"
+#if CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7
+# error "CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7"
#endif
#ifndef MIN
@@ -124,8 +124,8 @@
# define MAX(a,b) (a > b ? a : b)
#endif
-#define MIN_BUTTON MIN(CONFIG_EXAMPLE_BUTTONS_MIN, CONFIG_EXAMPLE_IRQBUTTONS_MIN)
-#define MAX_BUTTON MAX(CONFIG_EXAMPLE_BUTTONS_MAX, CONFIG_EXAMPLE_IRQBUTTONS_MAX)
+#define MIN_BUTTON MIN(CONFIG_EXAMPLES_BUTTONS_MIN, CONFIG_EXAMPLES_IRQBUTTONS_MIN)
+#define MAX_BUTTON MAX(CONFIG_EXAMPLES_BUTTONS_MAX, CONFIG_EXAMPLES_IRQBUTTONS_MAX)
#define NUM_BUTTONS (MAX_BUTTON - MIN_BUTTON + 1)
#define BUTTON_INDEX(b) ((b)-MIN_BUTTON)
@@ -187,7 +187,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
{
#if MIN_BUTTON < 1
{
- CONFIG_EXAMPLE_BUTTONS_NAME0,
+ CONFIG_EXAMPLES_BUTTONS_NAME0,
#ifdef CONFIG_ARCH_IRQBUTTONS
button0_handler
#endif
@@ -195,7 +195,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 2 && MAX_BUTTON > 0
{
- CONFIG_EXAMPLE_BUTTONS_NAME1,
+ CONFIG_EXAMPLES_BUTTONS_NAME1,
#ifdef CONFIG_ARCH_IRQBUTTONS
button1_handler
#endif
@@ -203,7 +203,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 3 && MAX_BUTTON > 1
{
- CONFIG_EXAMPLE_BUTTONS_NAME2,
+ CONFIG_EXAMPLES_BUTTONS_NAME2,
#ifdef CONFIG_ARCH_IRQBUTTONS
button2_handler
#endif
@@ -211,7 +211,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 4 && MAX_BUTTON > 2
{
- CONFIG_EXAMPLE_BUTTONS_NAME3,
+ CONFIG_EXAMPLES_BUTTONS_NAME3,
#ifdef CONFIG_ARCH_IRQBUTTONS
button3_handler
#endif
@@ -219,7 +219,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 5 && MAX_BUTTON > 3
{
- CONFIG_EXAMPLE_BUTTONS_NAME4,
+ CONFIG_EXAMPLES_BUTTONS_NAME4,
#ifdef CONFIG_ARCH_IRQBUTTONS
button4_handler
#endif
@@ -227,7 +227,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 6 && MAX_BUTTON > 4
{
- CONFIG_EXAMPLE_BUTTONS_NAME5,
+ CONFIG_EXAMPLES_BUTTONS_NAME5,
#ifdef CONFIG_ARCH_IRQBUTTONS
button5_handler
#endif
@@ -235,7 +235,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MIN_BUTTON < 7 && MAX_BUTTON > 5
{
- CONFIG_EXAMPLE_BUTTONS_NAME6,
+ CONFIG_EXAMPLES_BUTTONS_NAME6,
#ifdef CONFIG_ARCH_IRQBUTTONS
button6_handler
#endif
@@ -243,7 +243,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
#endif
#if MAX_BUTTON > 6
{
- CONFIG_EXAMPLE_BUTTONS_NAME7,
+ CONFIG_EXAMPLES_BUTTONS_NAME7,
#ifdef CONFIG_ARCH_IRQBUTTONS
button7_handler
#endif
@@ -419,7 +419,7 @@ int buttons_main(int argc, char *argv[])
/* Register to recieve button interrupts */
#ifdef CONFIG_ARCH_IRQBUTTONS
- for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
+ for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
{
xcpt_t oldhandler = up_irqbutton(i, g_buttoninfo[BUTTON_INDEX(i)].handler);
@@ -488,7 +488,7 @@ int buttons_main(int argc, char *argv[])
/* Un-register button handlers */
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_NSH_BUILTIN_APPS)
- for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
+ for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
{
(void)up_irqbutton(i, NULL);
}
diff --git a/apps/examples/dhcpd/target.c b/apps/examples/dhcpd/target.c
index 9c554e8cd..37758d041 100644
--- a/apps/examples/dhcpd/target.c
+++ b/apps/examples/dhcpd/target.c
@@ -57,16 +57,16 @@
* but there are default values for those so we cannot check them here.
*/
-#ifndef CONFIG_EXAMPLE_DHCPD_IPADDR
-# error "You must define CONFIG_EXAMPLE_DHCPD_IPADDR"
+#ifndef CONFIG_EXAMPLES_DHCPD_IPADDR
+# error "You must define CONFIG_EXAMPLES_DHCPD_IPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_DHCPD_DRIPADDR
-# error "You must define CONFIG_EXAMPLE_DHCPD_DRIPADDR"
+#ifndef CONFIG_EXAMPLES_DHCPD_DRIPADDR
+# error "You must define CONFIG_EXAMPLES_DHCPD_DRIPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_DHCPD_NETMASK
-# error "You must define CONFIG_EXAMPLE_DHCPD_NETMASK"
+#ifndef CONFIG_EXAMPLES_DHCPD_NETMASK
+# error "You must define CONFIG_EXAMPLES_DHCPD_NETMASK"
#endif
#ifndef CONFIG_NET
@@ -92,13 +92,13 @@
int dhcpd_main(int argc, char *argv[])
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_DHCPD_NOMAC)
+#if defined(CONFIG_EXAMPLES_DHCPD_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_DHCPD_NOMAC
+#ifdef CONFIG_EXAMPLES_DHCPD_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -110,17 +110,17 @@ int dhcpd_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DHCPD_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
uip_setnetmask("eth0", &addr);
/* Then start the server */
diff --git a/apps/examples/discover/Kconfig b/apps/examples/discover/Kconfig
index 0a756d91d..1cbb7f120 100644
--- a/apps/examples/discover/Kconfig
+++ b/apps/examples/discover/Kconfig
@@ -3,7 +3,7 @@
# see misc/tools/kconfig-language.txt.
#
-config EXAMPLE_DISCOVER
+config EXAMPLES_DISCOVER
bool "UDP Discovery Example"
default n
depends on NET_UDP
@@ -17,29 +17,29 @@ config EXAMPLE_DISCOVER
It is also possible to address all classes with a kind of broadcast
discover.
-config EXAMPLE_DISCOVER_DHCPC
+config EXAMPLES_DISCOVER_DHCPC
bool "DHCP Client"
default n
- depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
+ depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
select NETUTILS_DHCPC
select NETUTILS_RESOLV
-config EXAMPLE_DISCOVER_NOMAC
+config EXAMPLES_DISCOVER_NOMAC
bool "Use Canned MAC Address"
default n
- depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
+ depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
-config EXAMPLE_DISCOVER_IPADDR
+config EXAMPLES_DISCOVER_IPADDR
hex "Target IP address"
default 0x0a000002
- depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLE_DISCOVER_DHCPC
+ depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS && !EXAMPLES_DISCOVER_DHCPC
-config EXAMPLE_DISCOVER_DRIPADDR
+config EXAMPLES_DISCOVER_DRIPADDR
hex "Default Router IP address (Gateway)"
default 0x0a000001
- depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
+ depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
-config EXAMPLE_DISCOVER_NETMASK
+config EXAMPLES_DISCOVER_NETMASK
hex "Network Mask"
default 0xffffff00
- depends on EXAMPLE_DISCOVER && !NSH_BUILTIN_APPS
+ depends on EXAMPLES_DISCOVER && !NSH_BUILTIN_APPS
diff --git a/apps/examples/discover/discover_main.c b/apps/examples/discover/discover_main.c
index c3acb56df..259a93d98 100644
--- a/apps/examples/discover/discover_main.c
+++ b/apps/examples/discover/discover_main.c
@@ -54,7 +54,7 @@
#include <apps/netutils/uiplib.h>
#include <apps/netutils/discover.h>
-#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
+#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
# include <arpa/inet.h>
#endif
@@ -64,7 +64,7 @@
/* DHCPC may be used in conjunction with any other feature (or not) */
-#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
+#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
# include <apps/netutils/resolv.h>
# include <apps/netutils/dhcpc.h>
#endif
@@ -93,16 +93,16 @@ int discover_main(int argc, char *argv[])
#ifndef CONFIG_NSH_BUILTIN_APPS
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLE_DISCOVER_NOMAC)
+#if defined(CONFIG_EXAMPLES_DISCOVER_DHCPC) || defined(CONFIG_EXAMPLES_DISCOVER_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
-#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
+#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
void *handle;
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_DISCOVER_NOMAC
+#ifdef CONFIG_EXAMPLES_DISCOVER_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -114,24 +114,24 @@ int discover_main(int argc, char *argv[])
/* Set up our host address */
-#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
+#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
addr.s_addr = 0;
#else
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_IPADDR);
#endif
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_DISCOVER_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
uip_setnetmask("eth0", &addr);
-#ifdef CONFIG_EXAMPLE_DISCOVER_DHCPC
+#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
/* Set up the resolver */
resolv_init();
@@ -174,7 +174,7 @@ int discover_main(int argc, char *argv[])
printf("IP: %s\n", inet_ntoa(ds.ipaddr));
}
-#endif /* CONFIG_EXAMPLE_DISCOVER_DHCPC */
+#endif /* CONFIG_EXAMPLES_DISCOVER_DHCPC */
#endif /* CONFIG_NSH_BUILTIN_APPS */
if (discover_start() < 0)
diff --git a/apps/examples/ftpd/ftpd.h b/apps/examples/ftpd/ftpd.h
index 6a439e818..ad20bdfb1 100644
--- a/apps/examples/ftpd/ftpd.h
+++ b/apps/examples/ftpd/ftpd.h
@@ -61,12 +61,12 @@
* If CONFIG_EXAMPLES_FTPD_NONETINIT is not defined, then the following may
* be specified to customized the network configuration:
*
- * CONFIG_EXAMPLE_FTPD_NOMAC - If the hardware has no MAC address of its
+ * CONFIG_EXAMPLES_FTPD_NOMAC - If the hardware has no MAC address of its
* own, define this =y to provide a bogus address for testing.
- * CONFIG_EXAMPLE_FTPD_IPADDR - The target IP address. Default 10.0.0.2
- * CONFIG_EXAMPLE_FTPD_DRIPADDR - The default router address. Default
+ * CONFIG_EXAMPLES_FTPD_IPADDR - The target IP address. Default 10.0.0.2
+ * CONFIG_EXAMPLES_FTPD_DRIPADDR - The default router address. Default
* 10.0.0.1
- * CONFIG_EXAMPLE_FTPD_NETMASK - The network mask. Default: 255.255.255.0
+ * CONFIG_EXAMPLES_FTPD_NETMASK - The network mask. Default: 255.255.255.0
*/
#ifndef CONFIG_EXAMPLES_FTPD_PRIO
@@ -92,18 +92,18 @@
#endif
#ifdef CONFIG_EXAMPLES_FTPD_NONETINIT
-# undef CONFIG_EXAMPLE_FTPD_IPADDR
-# undef CONFIG_EXAMPLE_FTPD_DRIPADDR
-# undef CONFIG_EXAMPLE_FTPD_NETMASK
+# undef CONFIG_EXAMPLES_FTPD_IPADDR
+# undef CONFIG_EXAMPLES_FTPD_DRIPADDR
+# undef CONFIG_EXAMPLES_FTPD_NETMASK
#else
-# ifndef CONFIG_EXAMPLE_FTPD_IPADDR
-# define CONFIG_EXAMPLE_FTPD_IPADDR 0x0a000002
+# ifndef CONFIG_EXAMPLES_FTPD_IPADDR
+# define CONFIG_EXAMPLES_FTPD_IPADDR 0x0a000002
# endif
-# ifndef CONFIG_EXAMPLE_FTPD_DRIPADDR
-# define CONFIG_EXAMPLE_FTPD_DRIPADDR 0x0a000001
+# ifndef CONFIG_EXAMPLES_FTPD_DRIPADDR
+# define CONFIG_EXAMPLES_FTPD_DRIPADDR 0x0a000001
# endif
-# ifndef CONFIG_EXAMPLE_FTPD_NETMASK
-# define CONFIG_EXAMPLE_FTPD_NETMASK 0xffffff00
+# ifndef CONFIG_EXAMPLES_FTPD_NETMASK
+# define CONFIG_EXAMPLES_FTPD_NETMASK 0xffffff00
# endif
#endif
diff --git a/apps/examples/ftpd/ftpd_main.c b/apps/examples/ftpd/ftpd_main.c
index 6d19f952c..1907da18c 100644
--- a/apps/examples/ftpd/ftpd_main.c
+++ b/apps/examples/ftpd/ftpd_main.c
@@ -83,13 +83,13 @@ static void fptd_netinit(void)
{
#ifndef CONFIG_EXAMPLES_FTPD_NONETINIT
struct in_addr addr;
-#ifdef CONFIG_EXAMPLE_FTPD_NOMAC
+#ifdef CONFIG_EXAMPLES_FTPD_NOMAC
uint8_t mac[IFHWADDRLEN];
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_FTPD_NOMAC
+#ifdef CONFIG_EXAMPLES_FTPD_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -101,17 +101,17 @@ static void fptd_netinit(void)
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_FTPD_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_NETMASK);
uip_setnetmask("eth0", &addr);
#endif /* CONFIG_EXAMPLES_FTPD_NONETINIT */
}
diff --git a/apps/examples/igmp/igmp.c b/apps/examples/igmp/igmp.c
index 73ca8a3e6..ebb4feb07 100644
--- a/apps/examples/igmp/igmp.c
+++ b/apps/examples/igmp/igmp.c
@@ -64,8 +64,8 @@
* addresses=0xff (ff00::/8.)
*/
-#if ((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) < 0xe0000000ul) || \
- ((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) > 0xeffffffful)
+#if ((CONFIG_EXAMPLES_IGMP_GRPADDR & 0xffff0000) < 0xe0000000ul) || \
+ ((CONFIG_EXAMPLES_IGMP_GRPADDR & 0xffff0000) > 0xeffffffful)
# error "Bad range for IGMP group address"
#endif
@@ -84,7 +84,7 @@
int igmp_main(int argc, char *argv[])
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_IGMP_NOMAC)
+#if defined(CONFIG_EXAMPLES_IGMP_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
@@ -92,7 +92,7 @@ int igmp_main(int argc, char *argv[])
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_IGMP_NOMAC
+#ifdef CONFIG_EXAMPLES_IGMP_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -104,24 +104,24 @@ int igmp_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_NETMASK);
uip_setnetmask("eth0", &addr);
/* Not much of a test for now */
/* Join the group */
message("Join group...\n");
- addr.s_addr = HTONL(CONFIG_EXAMPLE_IGMP_GRPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_GRPADDR);
ipmsfilter("eth0", &addr, MCAST_INCLUDE);
/* Wait a while */
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile
index ac07665ab..9dd80e271 100644
--- a/apps/examples/nettest/Makefile
+++ b/apps/examples/nettest/Makefile
@@ -43,7 +43,7 @@ TARG_ASRCS =
TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
TARG_CSRCS = nettest.c
-ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
+ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
TARG_CSRCS += nettest_server.c
else
TARG_CSRCS += nettest_client.c
@@ -61,19 +61,19 @@ else
TARG_BIN = "$(TARG_POSIX)"
endif
-HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_HOST=1
-ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
-HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_SERVER=1 \
- -DCONFIG_EXAMPLE_NETTEST_CLIENTIP="$(CONFIG_EXAMPLE_NETTEST_CLIENTIP)"
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_HOST=1
+ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_SERVER=1 \
+ -DCONFIG_EXAMPLES_NETTEST_CLIENTIP="$(CONFIG_EXAMPLES_NETTEST_CLIENTIP)"
endif
-ifeq ($(CONFIG_EXAMPLE_NETTEST_PERFORMANCE),y)
-HOSTCFLAGS += -DCONFIG_EXAMPLE_NETTEST_PERFORMANCE=1
+ifeq ($(CONFIG_EXAMPLES_NETTEST_PERFORMANCE),y)
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_PERFORMANCE=1
endif
HOST_SRCS = host.c
-ifeq ($(CONFIG_EXAMPLE_NETTEST_SERVER),y)
+ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
HOST_SRCS += nettest_client.c
else
HOST_SRCS += nettest_server.c
diff --git a/apps/examples/nettest/host.c b/apps/examples/nettest/host.c
index 25cb85455..ad9d5e942 100644
--- a/apps/examples/nettest/host.c
+++ b/apps/examples/nettest/host.c
@@ -53,7 +53,7 @@
int main(int argc, char **argv, char **envp)
{
-#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
+#ifdef CONFIG_EXAMPLES_NETTEST_SERVER
send_client();
#else
recv_server();
diff --git a/apps/examples/nettest/nettest.c b/apps/examples/nettest/nettest.c
index b95d9da62..81faf9b93 100644
--- a/apps/examples/nettest/nettest.c
+++ b/apps/examples/nettest/nettest.c
@@ -68,13 +68,13 @@
int nettest_main(int argc, char *argv[])
{
struct in_addr addr;
-#ifdef CONFIG_EXAMPLE_NETTEST_NOMAC
+#ifdef CONFIG_EXAMPLES_NETTEST_NOMAC
uint8_t mac[IFHWADDRLEN];
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_NETTEST_NOMAC
+#ifdef CONFIG_EXAMPLES_NETTEST_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -86,20 +86,20 @@ int nettest_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_NETMASK);
uip_setnetmask("eth0", &addr);
-#ifdef CONFIG_EXAMPLE_NETTEST_SERVER
+#ifdef CONFIG_EXAMPLES_NETTEST_SERVER
recv_server();
#else
send_client();
diff --git a/apps/examples/nettest/nettest.h b/apps/examples/nettest/nettest.h
index be33215cf..f05038584 100644
--- a/apps/examples/nettest/nettest.h
+++ b/apps/examples/nettest/nettest.h
@@ -40,7 +40,7 @@
* Included Files
****************************************************************************/
-#ifdef CONFIG_EXAMPLE_NETTEST_HOST
+#ifdef CONFIG_EXAMPLES_NETTEST_HOST
#else
# include <debug.h>
#endif
@@ -49,7 +49,7 @@
* Definitions
****************************************************************************/
-#ifdef CONFIG_EXAMPLE_NETTEST_HOST
+#ifdef CONFIG_EXAMPLES_NETTEST_HOST
/* HTONS/L macros are unique to uIP */
# define HTONS(a) htons(a)
diff --git a/apps/examples/nettest/nettest_client.c b/apps/examples/nettest/nettest_client.c
index d498feb31..8ab5b14d6 100644
--- a/apps/examples/nettest/nettest_client.c
+++ b/apps/examples/nettest/nettest_client.c
@@ -56,12 +56,12 @@ void send_client(void)
{
struct sockaddr_in myaddr;
char *outbuf;
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
char *inbuf;
#endif
int sockfd;
int nbytessent;
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
int nbytesrecvd;
int totalbytesrecvd;
#endif
@@ -71,7 +71,7 @@ void send_client(void)
/* Allocate buffers */
outbuf = (char*)malloc(SENDSIZE);
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
inbuf = (char*)malloc(SENDSIZE);
if (!outbuf || !inbuf)
#else
@@ -98,7 +98,7 @@ void send_client(void)
#if 0
myaddr.sin_addr.s_addr = HTONL(INADDR_LOOPBACK);
#else
- myaddr.sin_addr.s_addr = HTONL(CONFIG_EXAMPLE_NETTEST_CLIENTIP);
+ myaddr.sin_addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_CLIENTIP);
#endif
message("client: Connecting...\n");
@@ -121,7 +121,7 @@ void send_client(void)
}
}
-#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifdef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
/* Then send messages forever */
for (;;)
@@ -192,7 +192,7 @@ void send_client(void)
close(sockfd);
free(outbuf);
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
free(inbuf);
#endif
return;
@@ -203,7 +203,7 @@ errout_with_socket:
errout_with_buffers:
free(outbuf);
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
free(inbuf);
#endif
exit(1);
diff --git a/apps/examples/nettest/nettest_server.c b/apps/examples/nettest/nettest_server.c
index 76a20e652..5757a778a 100644
--- a/apps/examples/nettest/nettest_server.c
+++ b/apps/examples/nettest/nettest_server.c
@@ -63,7 +63,7 @@ void recv_server(void)
int acceptsd;
socklen_t addrlen;
int nbytesread;
-#ifndef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifndef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
int totalbytesread;
int nbytessent;
int ch;
@@ -143,7 +143,7 @@ void recv_server(void)
}
#endif
-#ifdef CONFIG_EXAMPLE_NETTEST_PERFORMANCE
+#ifdef CONFIG_EXAMPLES_NETTEST_PERFORMANCE
/* Then receive data forever */
for (;;)
diff --git a/apps/examples/poll/net_listener.c b/apps/examples/poll/net_listener.c
index 81ad7cdcc..2be98673c 100644
--- a/apps/examples/poll/net_listener.c
+++ b/apps/examples/poll/net_listener.c
@@ -290,14 +290,14 @@ static inline bool net_mksocket(struct net_listener_s *nls)
static void net_configure(void)
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_POLL_NOMAC)
+#if defined(CONFIG_EXAMPLES_POLL_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
/* Configure uIP */
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_POLL_NOMAC
+#ifdef CONFIG_EXAMPLES_POLL_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -309,17 +309,17 @@ static void net_configure(void)
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
uip_setnetmask("eth0", &addr);
}
diff --git a/apps/examples/poll/net_reader.c b/apps/examples/poll/net_reader.c
index 8a13618c3..2f23bab3c 100644
--- a/apps/examples/poll/net_reader.c
+++ b/apps/examples/poll/net_reader.c
@@ -83,14 +83,14 @@
static void net_configure(void)
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_POLL_NOMAC)
+#if defined(CONFIG_EXAMPLES_POLL_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
/* Configure uIP */
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_POLL_NOMAC
+#ifdef CONFIG_EXAMPLES_POLL_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -102,17 +102,17 @@ static void net_configure(void)
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_POLL_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
uip_setnetmask("eth0", &addr);
}
diff --git a/apps/examples/sendmail/target.c b/apps/examples/sendmail/target.c
index 8440c7813..59a51f5d9 100644
--- a/apps/examples/sendmail/target.c
+++ b/apps/examples/sendmail/target.c
@@ -52,32 +52,32 @@
* Pre-processor Defintitions
****************************************************************************/
-#ifndef CONFIG_EXAMPLE_SENDMAIL_RECIPIENT
-# error "You must provice CONFIG_EXAMPLE_SENDMAIL_RECIPIENT"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_RECIPIENT
+# error "You must provice CONFIG_EXAMPLES_SENDMAIL_RECIPIENT"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_IPADDR
-# error "You must provice CONFIG_EXAMPLE_SENDMAIL_IPADDR"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_IPADDR
+# error "You must provice CONFIG_EXAMPLES_SENDMAIL_IPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_DRIPADDR
-# error "You must provice CONFIG_EXAMPLE_SENDMAIL_DRIPADDR"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_DRIPADDR
+# error "You must provice CONFIG_EXAMPLES_SENDMAIL_DRIPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_NETMASK
-# error "You must provice CONFIG_EXAMPLE_SENDMAIL_NETMASK"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_NETMASK
+# error "You must provice CONFIG_EXAMPLES_SENDMAIL_NETMASK"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_SENDER
-# define CONFIG_EXAMPLE_SENDMAIL_SENDER "nuttx-testing@example.com"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_SENDER
+# define CONFIG_EXAMPLES_SENDMAIL_SENDER "nuttx-testing@example.com"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_SUBJECT
-# define CONFIG_EXAMPLE_SENDMAIL_SUBJECT "Testing SMTP from NuttX"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_SUBJECT
+# define CONFIG_EXAMPLES_SENDMAIL_SUBJECT "Testing SMTP from NuttX"
#endif
-#ifndef CONFIG_EXAMPLE_SENDMAIL_BODY
-# define CONFIG_EXAMPLE_SENDMAIL_BODY "Test message sent by NuttX"
+#ifndef CONFIG_EXAMPLES_SENDMAIL_BODY
+# define CONFIG_EXAMPLES_SENDMAIL_BODY "Test message sent by NuttX"
#endif
/****************************************************************************
@@ -85,10 +85,10 @@
****************************************************************************/
static const char g_host_name[] = "localhost";
-static const char g_recipient[] = CONFIG_EXAMPLE_SENDMAIL_RECIPIENT;
-static const char g_sender[] = CONFIG_EXAMPLE_SENDMAIL_SENDER;
-static const char g_subject[] = CONFIG_EXAMPLE_SENDMAIL_SUBJECT;
-static const char g_msg_body[] = CONFIG_EXAMPLE_SENDMAIL_BODY "\r\n";
+static const char g_recipient[] = CONFIG_EXAMPLES_SENDMAIL_RECIPIENT;
+static const char g_sender[] = CONFIG_EXAMPLES_SENDMAIL_SENDER;
+static const char g_subject[] = CONFIG_EXAMPLES_SENDMAIL_SUBJECT;
+static const char g_msg_body[] = CONFIG_EXAMPLES_SENDMAIL_BODY "\r\n";
/****************************************************************************
* Private Functions
@@ -105,7 +105,7 @@ static const char g_msg_body[] = CONFIG_EXAMPLE_SENDMAIL_BODY "\r\n";
int sendmail_main(int argc, char *argv[])
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_SENDMAIL_NOMAC)
+#if defined(CONFIG_EXAMPLES_SENDMAIL_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
void *handle;
@@ -117,7 +117,7 @@ int sendmail_main(int argc, char *argv[])
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_SENDMAIL_NOMAC
+#ifdef CONFIG_EXAMPLES_SENDMAIL_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -129,17 +129,17 @@ int sendmail_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_SENDMAIL_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
uip_setnetmask("eth0", &addr);
/* Then send the mail */
diff --git a/apps/examples/telnetd/shell.c b/apps/examples/telnetd/shell.c
index 3033698c5..3058daa39 100644
--- a/apps/examples/telnetd/shell.c
+++ b/apps/examples/telnetd/shell.c
@@ -186,13 +186,13 @@ int shell_session(int argc, char *argv[])
static void shell_netinit(void)
{
struct in_addr addr;
-#ifdef CONFIG_EXAMPLE_TELNETD_NOMAC
+#ifdef CONFIG_EXAMPLES_TELNETD_NOMAC
uint8_t mac[IFHWADDRLEN];
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_TELNETD_NOMAC
+#ifdef CONFIG_EXAMPLES_TELNETD_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -204,17 +204,17 @@ static void shell_netinit(void)
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_TELNETD_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_NETMASK);
uip_setnetmask("eth0", &addr);
}
diff --git a/apps/examples/telnetd/shell.h b/apps/examples/telnetd/shell.h
index a5cec32b3..59d51a562 100644
--- a/apps/examples/telnetd/shell.h
+++ b/apps/examples/telnetd/shell.h
@@ -47,12 +47,12 @@
* Default: SCHED_PRIORITY_DEFAULT
* CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
* Telnet client. Default: 2048
- * CONFIG_EXAMPLE_TELNETD_NOMAC - If the hardware has no MAC address of its
+ * CONFIG_EXAMPLES_TELNETD_NOMAC - If the hardware has no MAC address of its
* own, define this =y to provide a bogus address for testing.
- * CONFIG_EXAMPLE_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
- * CONFIG_EXAMPLE_TELNETD_DRIPADDR - The default router address. Default
+ * CONFIG_EXAMPLES_TELNETD_IPADDR - The target IP address. Default 10.0.0.2
+ * CONFIG_EXAMPLES_TELNETD_DRIPADDR - The default router address. Default
* 10.0.0.1
- * CONFIG_EXAMPLE_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
+ * CONFIG_EXAMPLES_TELNETD_NETMASK - The network mask. Default: 255.255.255.0
*/
#ifndef CONFIG_EXAMPLES_TELNETD_DAEMONPRIO
@@ -71,14 +71,14 @@
# define CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE 2048
#endif
-#ifndef CONFIG_EXAMPLE_TELNETD_IPADDR
-# define CONFIG_EXAMPLE_TELNETD_IPADDR 0x0a000002
+#ifndef CONFIG_EXAMPLES_TELNETD_IPADDR
+# define CONFIG_EXAMPLES_TELNETD_IPADDR 0x0a000002
#endif
-#ifndef CONFIG_EXAMPLE_TELNETD_DRIPADDR
-# define CONFIG_EXAMPLE_TELNETD_DRIPADDR 0x0a000002
+#ifndef CONFIG_EXAMPLES_TELNETD_DRIPADDR
+# define CONFIG_EXAMPLES_TELNETD_DRIPADDR 0x0a000002
#endif
-#ifndef CONFIG_EXAMPLE_TELNETD_NETMASK
-# define CONFIG_EXAMPLE_TELNETD_NETMASK 0xffffff00
+#ifndef CONFIG_EXAMPLES_TELNETD_NETMASK
+# define CONFIG_EXAMPLES_TELNETD_NETMASK 0xffffff00
#endif
/* Other definitions ********************************************************/
diff --git a/apps/examples/thttpd/thttpd_main.c b/apps/examples/thttpd/thttpd_main.c
index f4d5d58db..b31d0a864 100644
--- a/apps/examples/thttpd/thttpd_main.c
+++ b/apps/examples/thttpd/thttpd_main.c
@@ -99,7 +99,7 @@
/* No MAC address operations */
-# undef CONFIG_EXAMPLE_THTTPD_NOMAC
+# undef CONFIG_EXAMPLES_THTTPD_NOMAC
/* TTY device to use */
@@ -172,7 +172,7 @@ int g_thttpdnsymbols;
int thttp_main(int argc, char *argv[])
{
struct in_addr addr;
-#ifdef CONFIG_EXAMPLE_THTTPD_NOMAC
+#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC
uint8_t mac[IFHWADDRLEN];
#endif
char *thttpd_argv = "thttpd";
@@ -191,7 +191,7 @@ int thttp_main(int argc, char *argv[])
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_THTTPD_NOMAC
+#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC
message("Assigning MAC\n");
mac[0] = 0x00;
@@ -211,12 +211,12 @@ int thttp_main(int argc, char *argv[])
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_THTTPD_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_DRIPADDR);
uip_setdraddr(NET_DEVNAME, &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_THTTPD_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_NETMASK);
uip_setnetmask(NET_DEVNAME, &addr);
/* Initialize the NXFLAT binary loader */
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)
diff --git a/apps/examples/uip/uip_main.c b/apps/examples/uip/uip_main.c
index b552aed75..6c2f96f39 100644
--- a/apps/examples/uip/uip_main.c
+++ b/apps/examples/uip/uip_main.c
@@ -59,7 +59,7 @@
#include <apps/netutils/uiplib.h>
-#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#ifdef CONFIG_EXAMPLES_UIP_DHCPC
#include <arpa/inet.h>
#endif
@@ -69,7 +69,7 @@
/* DHCPC may be used in conjunction with any other feature (or not) */
-#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#ifdef CONFIG_EXAMPLES_UIP_DHCPC
# include <apps/netutils/resolv.h>
# include <apps/netutils/dhcpc.h>
#endif
@@ -113,16 +113,16 @@
int uip_main(int argc, char *argv[])
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_UIP_DHCPC) || defined(CONFIG_EXAMPLE_UIP_NOMAC)
+#if defined(CONFIG_EXAMPLES_UIP_DHCPC) || defined(CONFIG_EXAMPLES_UIP_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
-#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#ifdef CONFIG_EXAMPLES_UIP_DHCPC
void *handle;
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_UIP_NOMAC
+#ifdef CONFIG_EXAMPLES_UIP_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -134,24 +134,24 @@ int uip_main(int argc, char *argv[])
/* Set up our host address */
-#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#ifdef CONFIG_EXAMPLES_UIP_DHCPC
addr.s_addr = 0;
#else
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_IPADDR);
#endif
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_UIP_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_NETMASK);
uip_setnetmask("eth0", &addr);
-#ifdef CONFIG_EXAMPLE_UIP_DHCPC
+#ifdef CONFIG_EXAMPLES_UIP_DHCPC
/* Set up the resolver */
resolv_init();
diff --git a/apps/examples/wget/Kconfig b/apps/examples/wget/Kconfig
index f7a1927f3..f7d5a2a89 100644
--- a/apps/examples/wget/Kconfig
+++ b/apps/examples/wget/Kconfig
@@ -6,8 +6,32 @@
config EXAMPLES_WGET
bool "wget example"
default n
+ depends on NET_TCP && !NSH_BUILTIN_APPS
---help---
Enable the wget example
if EXAMPLES_WGET
+
+config EXAMPLES_WGET_URL
+ string "File URL"
+ default ""
+ ---help---
+ The URL of the file to get
+
+config EXAMPLES_WGET_NOMAC
+ bool "Use Canned MAC Address"
+ default n
+
+config EXAMPLES_WGET_IPADDR
+ hex "Target IP address"
+ default 0x0a000002
+
+config EXAMPLES_WGET_DRIPADDR
+ hex "Default Router IP address (Gateway)"
+ default 0x0a000001
+
+config EXAMPLES_WGET_NETMASK
+ hex "Network Mask"
+ default 0xffffff00
+
endif
diff --git a/apps/examples/wget/target.c b/apps/examples/wget/target.c
index 5c5c65665..d205a81ae 100644
--- a/apps/examples/wget/target.c
+++ b/apps/examples/wget/target.c
@@ -62,16 +62,16 @@
* but there are default values for those so we cannot check them here.
*/
-#ifndef CONFIG_EXAMPLE_WGET_IPADDR
-# error "You must define CONFIG_EXAMPLE_WGET_IPADDR"
+#ifndef CONFIG_EXAMPLES_WGET_IPADDR
+# error "You must define CONFIG_EXAMPLES_WGET_IPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_WGET_DRIPADDR
-# error "You must define CONFIG_EXAMPLE_WGET_DRIPADDR"
+#ifndef CONFIG_EXAMPLES_WGET_DRIPADDR
+# error "You must define CONFIG_EXAMPLES_WGET_DRIPADDR"
#endif
-#ifndef CONFIG_EXAMPLE_WGET_NETMASK
-# error "You must define CONFIG_EXAMPLE_WGET_NETMASK"
+#ifndef CONFIG_EXAMPLES_WGET_NETMASK
+# error "You must define CONFIG_EXAMPLES_WGET_NETMASK"
#endif
#ifndef CONFIG_NET
@@ -112,13 +112,13 @@ static void callback(FAR char **buffer, int offset, int datend,
int wget_main(int argc, char *argv[])
{
struct in_addr addr;
-#if defined(CONFIG_EXAMPLE_WGET_NOMAC)
+#if defined(CONFIG_EXAMPLES_WGET_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
/* Many embedded network interfaces must have a software assigned MAC */
-#ifdef CONFIG_EXAMPLE_WGET_NOMAC
+#ifdef CONFIG_EXAMPLES_WGET_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -130,21 +130,21 @@ int wget_main(int argc, char *argv[])
/* Set up our host address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_IPADDR);
uip_sethostaddr("eth0", &addr);
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WGET_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_NETMASK);
uip_setnetmask("eth0", &addr);
/* Then start the server */
- wget(CONFIG_EXAMPLE_WGET_URL, g_iobuffer, 512, callback, NULL);
+ wget(CONFIG_EXAMPLES_WGET_URL, g_iobuffer, 512, callback, NULL);
return 0;
}
diff --git a/apps/examples/wlan/wlan_main.c b/apps/examples/wlan/wlan_main.c
index dcb8c770a..aa48a0238 100644
--- a/apps/examples/wlan/wlan_main.c
+++ b/apps/examples/wlan/wlan_main.c
@@ -64,7 +64,7 @@
/* DHCPC may be used in conjunction with any other feature (or not) */
-#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
+#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
# include <arpa/inet.h>
# include <apps/netutils/resolv.h>
# include <apps/netutils/dhcpc.h>
@@ -131,11 +131,11 @@ static struct usbhost_driver_s *g_drvr;
static inline void wlan_bringup(void)
{
-#if defined(CONFIG_EXAMPLE_WLAN_DHCPC) || defined(CONFIG_EXAMPLE_WLAN_NOMAC)
+#if defined(CONFIG_EXAMPLES_WLAN_DHCPC) || defined(CONFIG_EXAMPLES_WLAN_NOMAC)
uint8_t mac[IFHWADDRLEN];
#endif
struct in_addr addr;
-#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
+#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
void *handle;
#endif
@@ -143,7 +143,7 @@ static inline void wlan_bringup(void)
* MAC
*/
-#ifdef CONFIG_EXAMPLE_WLAN_NOMAC
+#ifdef CONFIG_EXAMPLES_WLAN_NOMAC
mac[0] = 0x00;
mac[1] = 0xe0;
mac[2] = 0xde;
@@ -155,24 +155,24 @@ static inline void wlan_bringup(void)
/* Set up the default router address */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_DRIPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_DRIPADDR);
uip_setdraddr("eth0", &addr);
/* Setup the subnet mask */
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_NETMASK);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_NETMASK);
uip_setnetmask("eth0", &addr);
/* Set up our host address */
-#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
+#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
addr.s_addr = 0;
#else
- addr.s_addr = HTONL(CONFIG_EXAMPLE_WLAN_IPADDR);
+ addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_IPADDR);
#endif
uip_sethostaddr("eth0", &addr);
-#ifdef CONFIG_EXAMPLE_WLAN_DHCPC
+#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
/* Set up the resolver */
resolv_init();