summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-06-13 09:14:40 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-06-13 09:14:40 +0200
commitc255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf (patch)
tree2254ceb7c66ba63b6cb6738af92c839f3868c748 /apps
parentbc5c15a4909386a1efd556f4648385440379b164 (diff)
downloadpx4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.tar.gz
px4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.tar.bz2
px4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.zip
Merged in upstream, took upstream UART driver without changes, needs re-evaluation (minor diffs to local version)
Diffstat (limited to 'apps')
-rw-r--r--apps/ChangeLog.txt4
-rw-r--r--apps/examples/Makefile38
-rw-r--r--apps/examples/README.txt31
-rw-r--r--apps/examples/lcdrw/Makefile2
-rw-r--r--apps/examples/nrf24l01_term/Makefile2
-rw-r--r--apps/examples/nx/Kconfig7
-rw-r--r--apps/examples/nx/Makefile2
-rw-r--r--apps/examples/nximage/Makefile2
-rw-r--r--apps/examples/nxtext/Kconfig7
-rw-r--r--apps/examples/nxtext/Makefile2
-rw-r--r--apps/examples/ostest/Kconfig7
-rw-r--r--apps/examples/ostest/Makefile2
-rw-r--r--apps/examples/tiff/Makefile2
-rw-r--r--apps/examples/tiff/tiff_main.c3
-rw-r--r--apps/examples/touchscreen/tc.h4
-rw-r--r--apps/examples/touchscreen/tc_main.c6
-rw-r--r--apps/examples/usbstorage/Kconfig12
-rw-r--r--apps/examples/usbstorage/Makefile2
-rw-r--r--apps/examples/usbstorage/usbmsc.h8
-rw-r--r--apps/examples/usbstorage/usbmsc_main.c14
-rw-r--r--apps/examples/usbterm/Makefile4
-rw-r--r--apps/system/i2c/Kconfig9
-rw-r--r--apps/system/i2c/README.txt4
-rw-r--r--apps/system/i2c/i2ctool.h2
24 files changed, 56 insertions, 120 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 71f7da62a..4be57aaf2 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -574,3 +574,7 @@
nRF24L01 driver. From Laurent Latil (2013-6-1).
* apps/nshlib/Kconfig: Add some missing NSH configuration values.
From Lorenz Meier (2013-6-2).
+ * Standardize on CONFIG_NSH_BUILTIN_APPS. Remove all other variants
+ of the build-as-an-NSH-application configuration settings
+ (2013-6-12).
+
diff --git a/apps/examples/Makefile b/apps/examples/Makefile
index eadb2db21..46e2efd27 100644
--- a/apps/examples/Makefile
+++ b/apps/examples/Makefile
@@ -49,45 +49,15 @@ SUBDIRS += wget wgetjson xmlrpc
# Sub-directories that might need context setup. Directories may need
# context setup for a variety of reasons, but the most common is because
# the example may be built as an NSH built-in function.
-#
-# Directories that may be built as NSH built-in functions may have their
-# own configuration setting (like CONFIG_EXAMPLES_HELLOXX_BUILTIN), but
-# many only depend on the generic CONFIG_NSH_BUILTIN_APPS setting. And
-# there a few which an ONLY be built as NSH built-in applications; these
-# are included in the list unconditionally.
CNTXTDIRS = pwm
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
CNTXTDIRS += adc can cdcacm composite cxxtest dhcpd discover flash_test ftpd
-CNTXTDIRS += hello helloxx json keypadtestmodbus mtdpart nettest nxhello
-CNTXTDIRS += nxlines nrf24l01_term relays qencoder slcd smart_test tcpecho
-CNTXTDIRS += telnetd touchscreen watchdog wgetjson
-endif
-
-ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
-CNTXTDIRS += lcdrw
-endif
-ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
-CNTXTDIRS += nx
-endif
-ifeq ($(CONFIG_EXAMPLES_NXIMAGE_BUILTIN),y)
-CNTXTDIRS += nximage
-endif
-ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
-CNTXTDIRS += nxtext
-endif
-ifeq ($(CONFIG_EXAMPLES_OSTEST_BUILTIN),y)
-CNTXTDIRS += ostest
-endif
-ifeq ($(CONFIG_EXAMPLES_TIFF_BUILTIN),y)
-CNTXTDIRS += tiff
-endif
-ifeq ($(CONFIG_EXAMPLES_USBMSC_BUILTIN),y)
-CNTXTDIRS += usbstorage
-endif
-ifeq ($(CONFIG_EXAMPLES_USBTERM_BUILTIN),y)
-CNTXTDIRS += usbterm
+CNTXTDIRS += hello helloxx json keypadtestmodbus lcdrw mtdpart nettest nx
+CNTXTDIRS += nxhello nximage nxlines nxtext nrf24l01_term ostest relays
+CNTXTDIRS += qencoder slcd smart_test tcpecho telnetd tiff touchscreen
+CNTXTDIRS += usbstorage usbterm watchdog wgetjson
endif
all: nothing
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index 7e3b0d0f0..8ef6b4a10 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -23,14 +23,6 @@ examples
- CONFIG_NSH_BUILTIN_APPS - Enable support for external registered,
"named" applications that can be executed from the NSH
command line (see apps/README.txt for more information).
- - CONFIG_EXAMPLES_XYZ_BUILTIN -- Build the XYZ example as a "built-in"
- that can be executed from the NSH command line (where XYZ is
- the specific example. See the following for examples that
- support this option).
-
- NOTE: The use of CONFIG_EXAMPLES_XYZ_BUILTIN is being phased
- out. For many example, the definition of CONFIG_NSH_BUILTIN_APPS
- is sufficient built the example as an NSH built-in application.
Older configurations.
@@ -543,7 +535,7 @@ examples/helloxx
NuttX configuration settings specific to this examp;le:
- CONFIG_EXAMPLES_HELLOXX_BUILTIN -- Build the helloxx example as a
+ CONFIG_NSH_BUILTIN_APPS -- Build the helloxx example as a
"built-in" that can be executed from the NSH command line.
CONFIG_EXAMPLES_HELLOXX_NOSTACKCONST - Set if the system does not
support construction of objects on the stack.
@@ -794,7 +786,7 @@ examples/nx
defined in include/nuttx/nx/nx.h. The following configuration options
can be selected:
- CONFIG_EXAMPLES_NX_BUILTIN -- Build the NX example as a "built-in"
+ CONFIG_NSH_BUILTIN_APPS -- Build the NX example as a "built-in"
that can be executed from the NSH command line
CONFIG_EXAMPLES_NX_VPLANE -- The plane to select from the frame-
buffer driver for use in the test. Default: 0
@@ -947,7 +939,7 @@ examplex/nxhello
The following configuration options can be selected:
- CONFIG_EXAMPLES_NXHELLO_BUILTIN -- Build the NXHELLO example as a "built-in"
+ CONFIG_NSH_BUILTIN_APPS -- Build the NXHELLO example as a "built-in"
that can be executed from the NSH command line
CONFIG_EXAMPLES_NXHELLO_VPLANE -- The plane to select from the frame-
buffer driver for use in the test. Default: 0
@@ -980,7 +972,7 @@ examples/nximage
of the display. This only works for RGB23 (888), RGB16 (656), RGB8 (332),
and 8-bit greyscale for now.
- CONFIG_EXAMPLES_NXIMAGE_BUILTIN -- Build the NXIMAGE example as a "built-in"
+ CONFIG_NSH_BUILTIN_APPS -- Build the NXIMAGE example as a "built-in"
that can be executed from the NSH command line
CONFIG_EXAMPLES_NXIMAGE_VPLANE -- The plane to select from the frame-
buffer driver for use in the test. Default: 0
@@ -1087,7 +1079,7 @@ examples/nxtext
The following configuration options can be selected:
- CONFIG_EXAMPLES_NXTEXT_BUILTIN -- Build the NXTEXT example as a "built-in"
+ CONFIG_NSH_BUILTIN_APPS -- Build the NXTEXT example as a "built-in"
that can be executed from the NSH command line
CONFIG_EXAMPLES_NXTEXT_VPLANE -- The plane to select from the frame-
buffer driver for use in the test. Default: 0
@@ -1165,7 +1157,7 @@ examples/ostest
The behavior of the ostest can be modified with the following
settings in the configs/<board-name>/defconfig file:
- * CONFIG_EXAMPLES_OSTEST_BUILTIN
+ * CONFIG_NSH_BUILTIN_APPS
Build the OS test example as an NSH built-in application.
* CONFIG_EXAMPLES_OSTEST_LOOPS
Used to control the number of executions of the test. If
@@ -1611,7 +1603,6 @@ examples/tiff
built-on, i.e., if the following is defined:
CONFIG_NSH_BUILTIN_APPS=y
- CONFIG_EXAMPLES_TIFF_BUILTIN=y
At a miniumum, to run in an embedded environment, you will probably have to
change the configured paths to the TIFF files defined in the example.
@@ -1635,7 +1626,7 @@ examples/touchscreen
and will print the touchscreen output as it is received from the
simulated touchscreen driver.
- CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN - Build the touchscreen test as
+ CONFIG_NSH_BUILTIN_APPS - Build the touchscreen test as
an NSH built-in function. Default: Built as a standalone problem
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR - The minor device number. Minor=N
corresponds to touchscreen device /dev/inputN. Note this value must
@@ -1643,7 +1634,7 @@ examples/touchscreen
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH - The path to the touchscreen
device. This must be consistent with CONFIG_EXAMPLES_TOUCHSCREEN_MINOR.
Default: "/dev/input0"
- CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES - If CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN
+ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES - If CONFIG_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: Samples are collected
@@ -1814,7 +1805,7 @@ examples/usbstorage
Configuration options:
- CONFIG_EXAMPLES_USBMSC_BUILTIN
+ CONFIG_NSH_BUILTIN_APPS
This example can be built as two NSH "built-in" commands if this option
is selected: 'msconn' will connect the USB mass storage device; 'msdis'
will disconnect the USB storage device.
@@ -1854,7 +1845,7 @@ examples/usbstorage
Error results are always shown in the trace output
- NOTE 1: When built as an NSH add-on command (CONFIG_EXAMPLES_USBMSC_BUILTIN=y),
+ NOTE 1: When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y),
Caution should be used to assure that the SD drive (or other storage device) is
not in use when the USB storage device is configured. Specifically, the SD
driver should be unmounted like:
@@ -1901,7 +1892,7 @@ examples/usbterm
Configuration options:
- CONFIG_EXAMPLES_USBTERM_BUILTIN - Build the usbterm example as an NSH
+ CONFIG_NSH_BUILTIN_APPS - Build the usbterm example as an NSH
built-in command. NOTE: This is not fully functional as of this
writing.. It should work, but there is no mechanism in place yet
to exit the USB terminal program and return to NSH.
diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile
index aab04acf5..59726f7c0 100644
--- a/apps/examples/lcdrw/Makefile
+++ b/apps/examples/lcdrw/Makefile
@@ -83,7 +83,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/nrf24l01_term/Makefile b/apps/examples/nrf24l01_term/Makefile
index cac8f5a6a..bf8ea760a 100644
--- a/apps/examples/nrf24l01_term/Makefile
+++ b/apps/examples/nrf24l01_term/Makefile
@@ -83,7 +83,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-#ifeq ($(CONFIG_EXAMPLES_NXHELLO_BUILTIN),y)
+#ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/nx/Kconfig b/apps/examples/nx/Kconfig
index 4dcc42579..59ee98a18 100644
--- a/apps/examples/nx/Kconfig
+++ b/apps/examples/nx/Kconfig
@@ -11,13 +11,6 @@ config EXAMPLES_NX
if EXAMPLES_NX
-config EXAMPLES_NX_BUILTIN
- bool "NSH Built-IN"
- depends on NSH_BUILTIN_APPS
- ---help---
- Build the NX example as a "built-in" that can be executed from the
- NSH command line
-
config EXAMPLES_NX_VPLANE
int "Video Plane"
default 0
diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile
index 13a938821..ea802d9e7 100644
--- a/apps/examples/nx/Makefile
+++ b/apps/examples/nx/Makefile
@@ -86,7 +86,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile
index 7bdaa46d2..42ab1adeb 100644
--- a/apps/examples/nximage/Makefile
+++ b/apps/examples/nximage/Makefile
@@ -83,7 +83,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_NXIMAGE_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/nxtext/Kconfig b/apps/examples/nxtext/Kconfig
index d7c6d507a..90f4e5cd2 100644
--- a/apps/examples/nxtext/Kconfig
+++ b/apps/examples/nxtext/Kconfig
@@ -13,13 +13,6 @@ if EXAMPLES_NXTEXT
comment "Basic Configuration of the example"
-config EXAMPLES_NXTEXT_BUILTIN
- bool "NSH Built-IN"
- depends on NSH_BUILTIN_APPS
- ---help---
- Build the NX Text example as a "built-in" that can be executed from the
- NSH command line.
-
config EXAMPLES_NXTEXT_VPLANE
int "Video Plane"
default 0
diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile
index dfb165608..cabae0520 100644
--- a/apps/examples/nxtext/Makefile
+++ b/apps/examples/nxtext/Makefile
@@ -87,7 +87,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/ostest/Kconfig b/apps/examples/ostest/Kconfig
index c3fe8f21d..0e0f2b016 100644
--- a/apps/examples/ostest/Kconfig
+++ b/apps/examples/ostest/Kconfig
@@ -11,13 +11,6 @@ config EXAMPLES_OSTEST
if EXAMPLES_OSTEST
-config EXAMPLES_OSTEST_BUILTIN
- bool "NSH built-in application"
- default y if NSH_LIBRARY
- default n if !NSH_LIBRARY
- ---help---
- Build the OS test example as an NSH built-in application.
-
config EXAMPLES_OSTEST_LOOPS
int "OS test loop"
default 1
diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
index e0265fc31..e8b6a176d 100644
--- a/apps/examples/ostest/Makefile
+++ b/apps/examples/ostest/Makefile
@@ -137,7 +137,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_OSTEST_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile
index 17b3bb92c..7be74a587 100644
--- a/apps/examples/tiff/Makefile
+++ b/apps/examples/tiff/Makefile
@@ -83,7 +83,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_TIFF_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/examples/tiff/tiff_main.c b/apps/examples/tiff/tiff_main.c
index 1bf931a43..357e29bf8 100644
--- a/apps/examples/tiff/tiff_main.c
+++ b/apps/examples/tiff/tiff_main.c
@@ -1,7 +1,7 @@
/****************************************************************************
* apps/graphics/tiff/tiff_main.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,6 @@
* built-on, i.e., if the following is defined:
*
* CONFIG_NSH_BUILTIN_APPS=y
- * CONFIG_EXAMPLES_TIFF_BUILTIN=y
*
* Other configuration options:
*
diff --git a/apps/examples/touchscreen/tc.h b/apps/examples/touchscreen/tc.h
index 055353ddd..1757fe0c8 100644
--- a/apps/examples/touchscreen/tc.h
+++ b/apps/examples/touchscreen/tc.h
@@ -46,7 +46,7 @@
* Definitions
****************************************************************************/
/* Configuration ************************************************************/
-/* CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN - Build the touchscreen test as
+/* CONFIG_NSH_BUILTIN_APPS - Build the touchscreen test as
* an NSH built-in function. Default: Built as a standalone problem
* CONFIG_EXAMPLES_TOUCHSCREEN_MINOR - The minor device number. Minor=N
* corresponds to touchscreen device /dev/input0. Note this value must
@@ -54,7 +54,7 @@
* CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH - The path to the touchscreen
* device. This must be consistent with CONFIG_EXAMPLES_TOUCHSCREEN_MINOR.
* Default: "/dev/input0"
- * CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES - If CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN
+ * CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES - If CONFIG_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: Zero (Samples are collected
diff --git a/apps/examples/touchscreen/tc_main.c b/apps/examples/touchscreen/tc_main.c
index d49902612..d786a6775 100644
--- a/apps/examples/touchscreen/tc_main.c
+++ b/apps/examples/touchscreen/tc_main.c
@@ -88,7 +88,7 @@ int tc_main(int argc, char *argv[])
{
struct touch_sample_s sample;
ssize_t nbytes;
-#if defined(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN) || CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES > 0
+#if defined(CONFIG_NSH_BUILTIN_APPS) || CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES > 0
long nsamples;
#endif
int fd;
@@ -99,7 +99,7 @@ int tc_main(int argc, char *argv[])
* samples that we collect before returning. Otherwise, we never return
*/
-#if defined(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN)
+#if defined(CONFIG_NSH_BUILTIN_APPS)
nsamples = 1;
if (argc > 1)
{
@@ -139,7 +139,7 @@ int tc_main(int argc, char *argv[])
* touchscreen samples.
*/
-#if defined(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN)
+#if defined(CONFIG_NSH_BUILTIN_APPS)
for (; nsamples > 0; nsamples--)
#elif CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES > 0
for (nsamples = 0; nsamples < CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES; nsamples++)
diff --git a/apps/examples/usbstorage/Kconfig b/apps/examples/usbstorage/Kconfig
index 823ae2953..c338ae99e 100644
--- a/apps/examples/usbstorage/Kconfig
+++ b/apps/examples/usbstorage/Kconfig
@@ -9,14 +9,7 @@ config EXAMPLES_USBMSC
---help---
Enable the USB mass storage class example
-config EXAMPLES_USBMSC_BUILTIN
- bool "NSH built-in command"
- default y
- depends on EXAMPLES_USBMSC && NSH_BUILTIN_APPS
- ---help---
- This example can be built as two NSH "built-in" commands if this
- option is selected: 'msconn' will connect the USB mass storage
- device; 'msdis' will disconnect the USB storage device.
+if EXAMPLES_USBMSC
config EXAMPLES_USBMSC_NLUNS
int "Number of LUNs"
@@ -134,3 +127,6 @@ config EXAMPLES_USBMSC_TRACEINTERRUPTS
then the example code will also manage the USB trace output. The
amount of trace output can be controlled this configuration value:
This setting will show USB device controller interrupt-related events.
+
+endif
+
diff --git a/apps/examples/usbstorage/Makefile b/apps/examples/usbstorage/Makefile
index 6c486bf9c..76198efa0 100644
--- a/apps/examples/usbstorage/Makefile
+++ b/apps/examples/usbstorage/Makefile
@@ -87,7 +87,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_USBMSC_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
diff --git a/apps/examples/usbstorage/usbmsc.h b/apps/examples/usbstorage/usbmsc.h
index 95453198a..b3652ab0a 100644
--- a/apps/examples/usbstorage/usbmsc.h
+++ b/apps/examples/usbstorage/usbmsc.h
@@ -109,17 +109,17 @@
* order to avoid name collisions.
*/
-#if defined(CONFIG_EXAMPLES_USBMSC_BUILTIN) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
+#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
struct usbmsc_state_s
{
/* This is the handle that references to this particular USB storage driver
* instance. It is only needed if the USB mass storage device example is
- * built using CONFIG_EXAMPLES_USBMSC_BUILTIN. In this case, the value
+ * built using CONFIG_NSH_BUILTIN_APPS. In this case, the value
* of the driver handle must be remembered between the 'msconn' and 'msdis'
* commands.
*/
-#ifdef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifdef CONFIG_NSH_BUILTIN_APPS
FAR void *mshandle;
#endif
@@ -143,7 +143,7 @@ struct usbmsc_state_s
* order to avoid name collisions.
*/
-#if defined(CONFIG_EXAMPLES_USBMSC_BUILTIN) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
+#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
extern struct usbmsc_state_s g_usbmsc;
#endif
diff --git a/apps/examples/usbstorage/usbmsc_main.c b/apps/examples/usbstorage/usbmsc_main.c
index ac7b82d01..5c0ae232e 100644
--- a/apps/examples/usbstorage/usbmsc_main.c
+++ b/apps/examples/usbstorage/usbmsc_main.c
@@ -98,7 +98,7 @@
* order to avoid name collisions.
*/
-#if defined(CONFIG_EXAMPLES_USBMSC_BUILTIN) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
+#if defined(CONFIG_NSH_BUILTIN_APPS) || defined(CONFIG_EXAMPLES_USBMSC_DEBUGMM)
struct usbmsc_state_s g_usbmsc;
#endif
@@ -383,7 +383,7 @@ static int usbmsc_enumerate(struct usbtrace_s *trace, void *arg)
*
* Description:
* This is the main program that configures the USB mass storage device
- * and exports the LUN(s). If CONFIG_EXAMPLES_USBMSC_BUILTIN is defined
+ * and exports the LUN(s). If CONFIG_NSH_BUILTIN_APPS is defined
* in the NuttX configuration, then this program can be executed by
* entering the "msconn" command at the NSH console.
*
@@ -398,7 +398,7 @@ int msconn_main(int argc, char *argv[])
* do a little error checking to assure that we are not being called re-entrantly.
*/
-#ifdef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifdef CONFIG_NSH_BUILTIN_APPS
/* Check if there is a non-NULL USB mass storage device handle (meaning that the
* USB mass storage device is already configured).
@@ -504,7 +504,7 @@ int msconn_main(int argc, char *argv[])
* then we have not real option but to exit now.
*/
-#if !defined(CONFIG_EXAMPLES_USBMSC_BUILTIN) && !defined(CONFIG_DISABLE_SIGNALS)
+#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS)
/* Otherwise, this thread will hang around and monitor the USB storage activity */
@@ -527,7 +527,7 @@ int msconn_main(int argc, char *argv[])
message("msconn_main: Still alive\n");
# endif
}
-#elif defined(CONFIG_EXAMPLES_USBMSC_BUILTIN)
+#elif defined(CONFIG_NSH_BUILTIN_APPS)
/* Return the USB mass storage device handle so it can be used by the 'misconn'
* command.
@@ -555,13 +555,13 @@ int msconn_main(int argc, char *argv[])
*
* Description:
* This is a program entry point that will disconnet the USB mass storage
- * device. This program is only available if CONFIG_EXAMPLES_USBMSC_BUILTIN
+ * device. This program is only available if CONFIG_NSH_BUILTIN_APPS
* is defined in the NuttX configuration. In that case, this program can
* be executed by entering the "msdis" command at the NSH console.
*
****************************************************************************/
-#ifdef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifdef CONFIG_NSH_BUILTIN_APPS
int msdis_main(int argc, char *argv[])
{
/* First check if the USB mass storage device is already connected */
diff --git a/apps/examples/usbterm/Makefile b/apps/examples/usbterm/Makefile
index 91e80686e..bf27558c5 100644
--- a/apps/examples/usbterm/Makefile
+++ b/apps/examples/usbterm/Makefile
@@ -1,7 +1,7 @@
############################################################################
# apps/examples/usbterm/Makefile
#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-ifeq ($(CONFIG_EXAMPLES_USBTERM_BUILTIN),y)
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
diff --git a/apps/system/i2c/Kconfig b/apps/system/i2c/Kconfig
index 745378b37..5898f7e7b 100644
--- a/apps/system/i2c/Kconfig
+++ b/apps/system/i2c/Kconfig
@@ -11,12 +11,7 @@ config SYSTEM_I2CTOOL
---help---
Enable support for the I2C tool.
-config I2CTOOL_BUILTIN
- bool "NSH built-in command"
- default y
- depends on SYSTEM_I2CTOOL && NSH_BUILTIN_APPS
- ---help---
- Build the tools as an NSH built-in command
+if SYSTEM_I2CTOOL
config I2CTOOL_MINBUS
int "Minimum bus number"
@@ -59,3 +54,5 @@ config I2CTOOL_DEFFREQ
depends on SYSTEM_I2CTOOL
---help---
Default I2C frequency (default: 4000000)
+
+endif
diff --git a/apps/system/i2c/README.txt b/apps/system/i2c/README.txt
index 1d6f22025..ee49e7d84 100644
--- a/apps/system/i2c/README.txt
+++ b/apps/system/i2c/README.txt
@@ -46,7 +46,7 @@ the apps/nshlib/README.txt file for information about add-ons.
Configuration Options
---------------------
-CONFIG_I2CTOOL_BUILTIN - Build the tools as an NSH built-in command
+CONFIG_NSH_BUILTIN_APPS - Build the tools as an NSH built-in command
CONFIG_I2CTOOL_MINBUS - Smallest bus index supported by the hardware (default 0).
CONFIG_I2CTOOL_MAXBUS - Largest bus index supported by the hardware (default 3)
CONFIG_I2CTOOL_MINADDR - Minium device address (default: 0x03)
@@ -391,7 +391,7 @@ options in the NuttX configuration. This configuration is the defconfig
file in your configuration directory that is copied to the NuttX top-level
directory as .config when NuttX is configured.
- CONFIG_I2CTOOL_BUILTIN: Build the tools as an NSH built-in command
+ CONFIG_NSH_BUILTIN_APPS: Build the tools as an NSH built-in command
CONFIG_I2CTOOL_MINBUS: Smallest bus index supported by the hardware (default 0).
CONFIG_I2CTOOL_MAXBUS: Largest bus index supported by the hardware (default 3)
CONFIG_I2CTOOL_MINADDR: Minium device address (default: 0x03)
diff --git a/apps/system/i2c/i2ctool.h b/apps/system/i2c/i2ctool.h
index 4ff26d03e..d8cc07203 100644
--- a/apps/system/i2c/i2ctool.h
+++ b/apps/system/i2c/i2ctool.h
@@ -55,7 +55,7 @@
* Definitions
****************************************************************************/
/* Configuration ************************************************************/
-/* CONFIG_I2CTOOL_BUILTIN - Build the tools as an NSH built-in command
+/* CONFIG_NSH_BUILTIN_APPS - Build the tools as an NSH built-in command
* CONFIG_I2CTOOL_MINBUS - Smallest bus index supported by the hardware (default 0).
* CONFIG_I2CTOOL_MAXBUS - Largest bus index supported by the hardware (default 3)
* CONFIG_I2CTOOL_MINADDR - Minium device address (default: 0x03)