summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-12-30 12:39:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-12-30 12:39:23 -0600
commit8ca22c23fa3fa96cf661888f6b8a104d4c1cbd1b (patch)
treeb45ebeacd667bd749ceaf1e54b1952a9747ce7ac /nuttx
parent740fa31fee4328e095cfb62a2a9128c858d7f062 (diff)
downloadpx4-nuttx-8ca22c23fa3fa96cf661888f6b8a104d4c1cbd1b.tar.gz
px4-nuttx-8ca22c23fa3fa96cf661888f6b8a104d4c1cbd1b.tar.bz2
px4-nuttx-8ca22c23fa3fa96cf661888f6b8a104d4c1cbd1b.zip
NxWM::CTouchscreen: Add CONFIG_NXWM_TOUCHSCREEN_DEVINIT to suppress attempts to initialize the touchscreen from NxWM in the kernel build
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/mikroe-stm32f4/fulldemo/defconfig1
-rw-r--r--nuttx/configs/sam3u-ek/nxwm/defconfig7
-rw-r--r--nuttx/configs/sama5d3x-ek/nxwm/defconfig6
-rw-r--r--nuttx/configs/shenzhou/nxwm/defconfig7
-rw-r--r--nuttx/configs/stm3220g-eval/nxwm/defconfig7
-rw-r--r--nuttx/configs/stm3240g-eval/knxwm/defconfig71
-rw-r--r--nuttx/configs/stm3240g-eval/nxwm/defconfig5
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_boot.c83
8 files changed, 92 insertions, 95 deletions
diff --git a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
index 3a814537b..e2d1da8e2 100644
--- a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
@@ -1228,6 +1228,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/sam3u-ek/nxwm/defconfig b/nuttx/configs/sam3u-ek/nxwm/defconfig
index bb914266e..1214e2faf 100644
--- a/nuttx/configs/sam3u-ek/nxwm/defconfig
+++ b/nuttx/configs/sam3u-ek/nxwm/defconfig
@@ -563,6 +563,7 @@ CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
+# CONFIG_NX_NXSTART is not set
#
# Memory Management
@@ -824,7 +825,6 @@ CONFIG_NXWIDGETS=y
CONFIG_NXWIDGETS_FLICKERFREE=y
# CONFIG_NXWIDGETS_EXTERNINIT is not set
CONFIG_NXWIDGETS_DEVNO=0
-CONFIG_NXWIDGETS_VPLANE=0
CONFIG_NXWIDGET_SERVERINIT=y
CONFIG_NXWIDGETS_SERVERPRIO=110
CONFIG_NXWIDGETS_SERVERSTACK=1596
@@ -923,10 +923,6 @@ CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100
CONFIG_NXWM_STARTWINDOW_STACKSIZE=1596
-
-#
-# NxConsole Window Configuration
-#
CONFIG_NXWM_NXCONSOLE=y
CONFIG_NXWM_NXCONSOLE_PRIO=100
CONFIG_NXWM_NXCONSOLE_STACKSIZE=1596
@@ -942,6 +938,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/sama5d3x-ek/nxwm/defconfig b/nuttx/configs/sama5d3x-ek/nxwm/defconfig
index 78a270aa3..9f42b8eca 100644
--- a/nuttx/configs/sama5d3x-ek/nxwm/defconfig
+++ b/nuttx/configs/sama5d3x-ek/nxwm/defconfig
@@ -595,6 +595,7 @@ CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
+# CONFIG_NX_NXSTART is not set
#
# Memory Management
@@ -959,10 +960,6 @@ CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100
CONFIG_NXWM_STARTWINDOW_STACKSIZE=1596
-
-#
-# NxConsole Window Configuration
-#
CONFIG_NXWM_NXCONSOLE=y
CONFIG_NXWM_NXCONSOLE_PRIO=100
CONFIG_NXWM_NXCONSOLE_STACKSIZE=1596
@@ -978,6 +975,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig
index c2418ab04..ff9e0936f 100644
--- a/nuttx/configs/shenzhou/nxwm/defconfig
+++ b/nuttx/configs/shenzhou/nxwm/defconfig
@@ -756,6 +756,7 @@ CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
+# CONFIG_NX_NXSTART is not set
#
# Memory Management
@@ -1039,7 +1040,6 @@ CONFIG_NXWIDGETS=y
CONFIG_NXWIDGETS_FLICKERFREE=y
# CONFIG_NXWIDGETS_EXTERNINIT is not set
CONFIG_NXWIDGETS_DEVNO=0
-CONFIG_NXWIDGETS_VPLANE=0
CONFIG_NXWIDGET_SERVERINIT=y
CONFIG_NXWIDGETS_SERVERPRIO=110
CONFIG_NXWIDGETS_SERVERSTACK=1596
@@ -1138,10 +1138,6 @@ CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100
CONFIG_NXWM_STARTWINDOW_STACKSIZE=1596
-
-#
-# NxConsole Window Configuration
-#
CONFIG_NXWM_NXCONSOLE=y
CONFIG_NXWM_NXCONSOLE_PRIO=100
CONFIG_NXWM_NXCONSOLE_STACKSIZE=1596
@@ -1157,6 +1153,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig
index e0d36df7c..a999c3c31 100644
--- a/nuttx/configs/stm3220g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig
@@ -774,6 +774,7 @@ CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
+# CONFIG_NX_NXSTART is not set
#
# Memory Management
@@ -1057,7 +1058,6 @@ CONFIG_NXWIDGETS=y
CONFIG_NXWIDGETS_FLICKERFREE=y
# CONFIG_NXWIDGETS_EXTERNINIT is not set
CONFIG_NXWIDGETS_DEVNO=0
-CONFIG_NXWIDGETS_VPLANE=0
CONFIG_NXWIDGET_SERVERINIT=y
CONFIG_NXWIDGETS_SERVERPRIO=110
CONFIG_NXWIDGETS_SERVERSTACK=2048
@@ -1161,10 +1161,6 @@ CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100
CONFIG_NXWM_STARTWINDOW_STACKSIZE=2048
-
-#
-# NxConsole Window Configuration
-#
CONFIG_NXWM_NXCONSOLE=y
CONFIG_NXWM_NXCONSOLE_PRIO=100
CONFIG_NXWM_NXCONSOLE_STACKSIZE=2048
@@ -1180,6 +1176,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/stm3240g-eval/knxwm/defconfig b/nuttx/configs/stm3240g-eval/knxwm/defconfig
index ed7996713..b573bcb14 100644
--- a/nuttx/configs/stm3240g-eval/knxwm/defconfig
+++ b/nuttx/configs/stm3240g-eval/knxwm/defconfig
@@ -373,7 +373,6 @@ CONFIG_ARCH_LEDS=y
CONFIG_ARCH_HAVE_BUTTONS=y
# CONFIG_ARCH_BUTTONS is not set
CONFIG_ARCH_HAVE_IRQBUTTONS=y
-CONFIG_NSH_MMCSDMINOR=0
#
# Board-Specific Options
@@ -386,7 +385,7 @@ CONFIG_STM3240G_LCD=y
#
# RTOS Features
#
-# CONFIG_BOARD_INITIALIZE is not set
+CONFIG_BOARD_INITIALIZE=y
CONFIG_MSEC_PER_TICK=10
# CONFIG_SYSTEM_TIME64 is not set
CONFIG_RR_INTERVAL=200
@@ -871,73 +870,7 @@ CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)"
#
# NSH Library
#
-CONFIG_NSH_LIBRARY=y
-
-#
-# Disable Individual commands
-#
-# CONFIG_NSH_DISABLE_ADDROUTE is not set
-# CONFIG_NSH_DISABLE_CAT is not set
-# CONFIG_NSH_DISABLE_CD is not set
-# CONFIG_NSH_DISABLE_CP is not set
-# CONFIG_NSH_DISABLE_CMP is not set
-# CONFIG_NSH_DISABLE_DD is not set
-# CONFIG_NSH_DISABLE_DELROUTE is not set
-# CONFIG_NSH_DISABLE_ECHO is not set
-# CONFIG_NSH_DISABLE_EXEC is not set
-# CONFIG_NSH_DISABLE_EXIT is not set
-# CONFIG_NSH_DISABLE_FREE is not set
-# CONFIG_NSH_DISABLE_GET is not set
-# CONFIG_NSH_DISABLE_HELP is not set
-# CONFIG_NSH_DISABLE_HEXDUMP is not set
-# CONFIG_NSH_DISABLE_IFCONFIG is not set
-# CONFIG_NSH_DISABLE_KILL is not set
-# CONFIG_NSH_DISABLE_LOSETUP is not set
-# CONFIG_NSH_DISABLE_LS is not set
-# CONFIG_NSH_DISABLE_MB is not set
-# CONFIG_NSH_DISABLE_MKDIR is not set
-# CONFIG_NSH_DISABLE_MKFATFS is not set
-# CONFIG_NSH_DISABLE_MKFIFO is not set
-# CONFIG_NSH_DISABLE_MKRD is not set
-# CONFIG_NSH_DISABLE_MH is not set
-# CONFIG_NSH_DISABLE_MOUNT is not set
-# CONFIG_NSH_DISABLE_MW is not set
-# CONFIG_NSH_DISABLE_NSFMOUNT is not set
-# CONFIG_NSH_DISABLE_PS is not set
-# CONFIG_NSH_DISABLE_PING is not set
-# CONFIG_NSH_DISABLE_PUT is not set
-# CONFIG_NSH_DISABLE_PWD is not set
-# CONFIG_NSH_DISABLE_RM is not set
-# CONFIG_NSH_DISABLE_RMDIR is not set
-# CONFIG_NSH_DISABLE_SET is not set
-# CONFIG_NSH_DISABLE_SH is not set
-# CONFIG_NSH_DISABLE_SLEEP is not set
-# CONFIG_NSH_DISABLE_TEST is not set
-# CONFIG_NSH_DISABLE_UMOUNT is not set
-# CONFIG_NSH_DISABLE_UNSET is not set
-# CONFIG_NSH_DISABLE_USLEEP is not set
-# CONFIG_NSH_DISABLE_WGET is not set
-# CONFIG_NSH_DISABLE_XD is not set
-
-#
-# Configure Command Options
-#
-# CONFIG_NSH_CMDOPT_DF_H is not set
-CONFIG_NSH_CODECS_BUFSIZE=128
-# CONFIG_NSH_CMDOPT_HEXDUMP is not set
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_MAXARGUMENTS=6
-CONFIG_NSH_NESTDEPTH=3
-# CONFIG_NSH_DISABLESCRIPT is not set
-# CONFIG_NSH_DISABLEBG is not set
-CONFIG_NSH_CONSOLE=y
-
-#
-# USB Trace Support
-#
-# CONFIG_NSH_CONDEV is not set
-# CONFIG_NSH_ARCHINIT is not set
+# CONFIG_NSH_LIBRARY is not set
#
# NxWidgets/NxWM
diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig
index eb174bae8..d903a5548 100644
--- a/nuttx/configs/stm3240g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig
@@ -1156,10 +1156,6 @@ CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
CONFIG_NXWM_STARTWINDOW_PRIO=100
CONFIG_NXWM_STARTWINDOW_STACKSIZE=2048
-
-#
-# NxConsole Window Configuration
-#
CONFIG_NXWM_NXCONSOLE=y
CONFIG_NXWM_NXCONSOLE_PRIO=100
CONFIG_NXWM_NXCONSOLE_STACKSIZE=2048
@@ -1175,6 +1171,7 @@ CONFIG_NXWM_TOUCHSCREEN=y
#
# Touchscreen device settings
#
+CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y
CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
diff --git a/nuttx/configs/stm3240g-eval/src/up_boot.c b/nuttx/configs/stm3240g-eval/src/up_boot.c
index e32cdcd74..7a77c6705 100644
--- a/nuttx/configs/stm3240g-eval/src/up_boot.c
+++ b/nuttx/configs/stm3240g-eval/src/up_boot.c
@@ -47,8 +47,60 @@
#include "stm3240g-internal.h"
/************************************************************************************
- * Definitions
+ * Pre-processor Definitions
************************************************************************************/
+/* Configuration ********************************************************************/
+/* Should we initialize the NX server? This is done for NxWidgets (CONFIG_NXWIDGETS=y)
+ * if nx_start() is available (CONFIG_NX_NXSTART=y) and if the NxWidget::CNxServer
+ * class expects the RTOS to do the NX initialization (CONFIG_NXWIDGET_SERVERINIT=n).
+ * This combination of settings is normally only used in the kernel build mode
+ * (CONFIG_NUTTX_KERNEL) when NxWidgets is unable to initialize NX from user-space.
+ */
+
+#undef HAVE_NXSTART
+
+#if !defined(CONFIG_NX_MULTIUSER)
+# undef CONFIG_NX_START
+#endif
+
+#if defined(CONFIG_NXWIDGETS)
+# if defined(CONFIG_NX_NXSTART)
+# if !defined(CONFIG_NXWIDGET_SERVERINIT)
+# define HAVE_NXSTART
+# include <nuttx/nx/nx.h>
+# endif
+# else
+# if !defined(CONFIG_NXWIDGET_SERVERINIT) && defined(CONFIG_NUTTX_KERNEL)
+# error CONFIG_NX_NXSTART=y is needed
+# endif
+# endif
+#endif
+
+/* Should we initialize the touchscreen for the NxWM (CONFIG_NXWM=y)? This
+ * is done if we have a touchscreen (CONFIG_INPUT_STMPE811=y), NxWM uses the
+ * touchscreen (CONFIG_NXWM_TOUCHSCREEN=y), and if we were asked to
+ * initialize the touchscreen for NxWM (NXWM_TOUCHSCREEN_DEVINIT=n). This
+ * combination of settings is normally only used in the kernel build mode
+ * (CONFIG_NUTTX_KERNEL) when NxWidgets is unable to initialize NX from
+ * user-space.
+ */
+
+#undef HAVE_TCINIT
+
+#if defined(CONFIG_NXWM_TOUCHSCREEN)
+# if !defined(CONFIG_NXWM_TOUCHSCREEN_DEVNO)
+# error CONFIG_NXWM_TOUCHSCREEN_DEVNO is not defined
+# elif defined(CONFIG_INPUT_STMPE811)
+# if !defined(CONFIG_NXWM_TOUCHSCREEN_DEVINIT)
+# define HAVE_TCINIT
+# include <nuttx/input/touchscreen.h>
+# endif
+# else
+# if !defined(CONFIG_NXWM_TOUCHSCREEN_DEVINIT) && defined(CONFIG_NUTTX_KERNEL)
+# error CONFIG_INPUT_STMPE811=y is needed
+# endif
+# endif
+#endif
/************************************************************************************
* Private Functions
@@ -122,14 +174,39 @@ void stm32_boardinitialize(void)
#ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void)
{
+ int ret;
+
/* Perform NSH initialization here instead of from the NSH. This
* alternative NSH initialization is necessary when NSH is ran in user-space
* but the initialization function must run in kernel space.
*/
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
- (void)nsh_archinitialize();
+ ret = nsh_archinitialize();
+ if (ret < 0)
+ {
+ gdbg("ERROR: nsh_archinitialize failed: %d\n", ret);
+ }
#endif
-}
+
+ /* Initialize the NX server */
+
+#ifdef HAVE_NXSTART
+ ret = nx_start();
+ if (ret < 0)
+ {
+ gdbg("ERROR: nx_start failed: %d\n", ret);
+ }
#endif
+ /* Initialize the touchscreen */
+
+#ifdef HAVE_TCINIT
+ ret = arch_tcinitialize(CONFIG_NXWM_TOUCHSCREEN_DEVNO);
+ if (ret < 0)
+ {
+ gdbg("ERROR: arch_tcinitialize failed: %d\n", ret);
+ }
+#endif
+}
+#endif