Skip to content

Commit

Permalink
Merged in upstream, took upstream UART driver without changes, needs …
Browse files Browse the repository at this point in the history
…re-evaluation (minor diffs to local version)
  • Loading branch information
LorenzMeier committed Jun 13, 2013
1 parent bc5c15a commit c255df1
Show file tree
Hide file tree
Showing 234 changed files with 13,766 additions and 3,460 deletions.
4 changes: 4 additions & 0 deletions apps/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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).

38 changes: 4 additions & 34 deletions apps/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 11 additions & 20 deletions apps/examples/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -1635,15 +1626,15 @@ 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
with CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH. Default 0.
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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/lcdrw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion apps/examples/nrf24l01_term/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 0 additions & 7 deletions apps/examples/nx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/nx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion apps/examples/nximage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 0 additions & 7 deletions apps/examples/nxtext/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/nxtext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 0 additions & 7 deletions apps/examples/ostest/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/ostest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion apps/examples/tiff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions apps/examples/tiff/tiff_main.c
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -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:
*
Expand Down
4 changes: 2 additions & 2 deletions apps/examples/touchscreen/tc.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
* 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
* with CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH. Default 0.
* 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
Expand Down
6 changes: 3 additions & 3 deletions apps/examples/touchscreen/tc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down Expand Up @@ -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++)
Expand Down
12 changes: 4 additions & 8 deletions apps/examples/usbstorage/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

2 changes: 1 addition & 1 deletion apps/examples/usbstorage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit c255df1

Please sign in to comment.