summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NxWidgets/ChangeLog.txt7
-rw-r--r--NxWidgets/Kconfig16
-rw-r--r--NxWidgets/libnxwidgets/src/cimage.cxx2
-rw-r--r--NxWidgets/nxwm/src/ctouchscreen.cxx2
-rw-r--r--apps/NxWidgets/Kconfig16
-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
13 files changed, 135 insertions, 95 deletions
diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt
index d29b815aa..81504c194 100644
--- a/NxWidgets/ChangeLog.txt
+++ b/NxWidgets/ChangeLog.txt
@@ -417,3 +417,10 @@
This is because in the kernel build mode, the NX server must be initialized
in kernel mode by the RTOS before applications using the server run in
user mode.
+* NxWm: Added CONFIG_NXWM_NXCONSOLE that can be used to disable the NxConsole
+ window (2013-12-30).
+* NxWm::CTouchscreen: Added CONFIG_NXWM_TOUCHSCREEN_DEVINIT that can be used
+ to suppress calls to initialize the touchscreen device from the listener
+ thread. This is necessary if the kernel mode build is used: In that case,
+ the touchscreen must be initialized in kernel space before NxWM is started
+ (2013-12-30).
diff --git a/NxWidgets/Kconfig b/NxWidgets/Kconfig
index 8399e23c4..5f956df54 100644
--- a/NxWidgets/Kconfig
+++ b/NxWidgets/Kconfig
@@ -738,6 +738,22 @@ if NXWM_TOUCHSCREEN
comment "Touchscreen device settings"
+config NXWM_TOUCHSCREEN_DEVINIT
+ bool "Touchscreen Device Initialization"
+ default y
+ depends on !NUTTX_KERNEL
+ ---help---
+ It this option is selected, then the NxWM:CTouchscreen listener
+ thread will call a function arch_tcinitialize(NXWM_TOUCHSCREEN_DEVNO)
+ in order to instantiate the touchscreen driver at path
+ NXWM_TOUCHSCREEN_DEVPATH. If NXWM_TOUCHSCREEN_DEVINIT is not
+ selected, then the NxWM:CTouchscreen listener thread will assume
+ that the driver has already been initialized at
+ NXWM_TOUCHSCREEN_DEVPATH.
+
+ NOTE that in the kernel build, all touchscreen initialize must be
+ performed in kernel logic prior to the execution of NxWM.
+
config NXWM_TOUCHSCREEN_DEVNO
int "Touchscreen Device Number"
default 0
diff --git a/NxWidgets/libnxwidgets/src/cimage.cxx b/NxWidgets/libnxwidgets/src/cimage.cxx
index b9b93ebb6..eaf4e3005 100644
--- a/NxWidgets/libnxwidgets/src/cimage.cxx
+++ b/NxWidgets/libnxwidgets/src/cimage.cxx
@@ -235,6 +235,7 @@ void CImage::drawContents(CGraphicsPort *port)
// This is the number of rows that we have to pad on the right if the display
// width is wider than the image width
+#if 0 // Not used
nxgl_coord_t nRightPad;
if (nLeftPixels >= rect.getWidth())
{
@@ -244,6 +245,7 @@ void CImage::drawContents(CGraphicsPort *port)
{
nRightPad = rect.getWidth() - nLeftPixels;
}
+#endif
// Apply the padding to the right hand side
diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx
index 853132008..8bf570f74 100644
--- a/NxWidgets/nxwm/src/ctouchscreen.cxx
+++ b/NxWidgets/nxwm/src/ctouchscreen.cxx
@@ -278,6 +278,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
vdbg("Listener started\n");
+#ifdef CONFIG_NXWM_TOUCHSCREEN_DEVINIT
// Initialize the touchscreen device
int ret = arch_tcinitialize(CONFIG_NXWM_TOUCHSCREEN_DEVNO);
@@ -288,6 +289,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
sem_post(&This->m_waitSem);
return (FAR void *)0;
}
+#endif
// Open the touchscreen device that we just created.
diff --git a/apps/NxWidgets/Kconfig b/apps/NxWidgets/Kconfig
index 8399e23c4..5f956df54 100644
--- a/apps/NxWidgets/Kconfig
+++ b/apps/NxWidgets/Kconfig
@@ -738,6 +738,22 @@ if NXWM_TOUCHSCREEN
comment "Touchscreen device settings"
+config NXWM_TOUCHSCREEN_DEVINIT
+ bool "Touchscreen Device Initialization"
+ default y
+ depends on !NUTTX_KERNEL
+ ---help---
+ It this option is selected, then the NxWM:CTouchscreen listener
+ thread will call a function arch_tcinitialize(NXWM_TOUCHSCREEN_DEVNO)
+ in order to instantiate the touchscreen driver at path
+ NXWM_TOUCHSCREEN_DEVPATH. If NXWM_TOUCHSCREEN_DEVINIT is not
+ selected, then the NxWM:CTouchscreen listener thread will assume
+ that the driver has already been initialized at
+ NXWM_TOUCHSCREEN_DEVPATH.
+
+ NOTE that in the kernel build, all touchscreen initialize must be
+ performed in kernel logic prior to the execution of NxWM.
+
config NXWM_TOUCHSCREEN_DEVNO
int "Touchscreen Device Number"
default 0
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