NxWM::CTouchscreen: Add CONFIG_NXWM_TOUCHSCREEN_DEVINIT to suppress attempts to initialize the touchscreen from NxWM in the kernel build

This commit is contained in:
Gregory Nutt 2013-12-30 12:39:23 -06:00
parent cea31ebf68
commit 4c3b605c19
8 changed files with 92 additions and 95 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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