diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-29 22:20:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-29 22:20:47 +0000 |
commit | 67ea31797d0a81295664484a61aebd54607f3c86 (patch) | |
tree | ffdeb3afd707f0c9bd41edbf3a2e48756fbc8065 /apps/examples/nxconsole/nxcon_internal.h | |
parent | 3e62f2be816d0a212b52fd609121004b16d80a8a (diff) | |
download | nuttx-67ea31797d0a81295664484a61aebd54607f3c86.tar.gz nuttx-67ea31797d0a81295664484a61aebd54607f3c86.tar.bz2 nuttx-67ea31797d0a81295664484a61aebd54607f3c86.zip |
Can now run an NSH session within an NX window
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4539 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxconsole/nxcon_internal.h')
-rw-r--r-- | apps/examples/nxconsole/nxcon_internal.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/apps/examples/nxconsole/nxcon_internal.h b/apps/examples/nxconsole/nxcon_internal.h index 96ea8f781..199bbd052 100644 --- a/apps/examples/nxconsole/nxcon_internal.h +++ b/apps/examples/nxconsole/nxcon_internal.h @@ -56,21 +56,37 @@ /**************************************************************************** * Definitions ****************************************************************************/ - /* Configuration ************************************************************/ +/* Need NX graphics support */ #ifndef CONFIG_NX # error "NX is not enabled (CONFIG_NX=y)" #endif +/* Can't do the NxConsole example if the NxConsole driver is not built */ + #ifndef CONFIG_NXCONSOLE # error "NxConsole is not enabled (CONFIG_NXCONSOLE=y)" #endif +/* NxConsole requires NX Multi-user mode */ + #ifndef CONFIG_NX_MULTIUSER # error "Multi-user NX support is required (CONFIG_NX_MULTIUSER=y)" #endif +/* If there is no NSH console, then why are we running this example? */ + +#ifndef CONFIG_NSH_CONSOLE +# warning "Expected CONFIG_NSH_CONSOLE=y" +#endif + +/* The NSH telnet console requires networking support (and TCP/IP) */ + +#ifndef CONFIG_NET +# undef CONFIG_NSH_TELNET +#endif + /* If not specified, assume that the hardware supports one video plane */ #if CONFIG_NX_NPLANES != 1 @@ -209,6 +225,16 @@ # define CONFIG_EXAMPLES_NXCON_DEVNAME "/dev/nxcon0" #endif +/* NxConsole task */ + +#ifndef CONFIG_EXAMPLES_NXCONSOLE_PRIO +# define CONFIG_EXAMPLES_NXCONSOLE_PRIO SCHED_PRIORITY_DEFAULT +#endif + +#ifndef CONFIG_EXAMPLES_NXCONSOLE_STACKSIZE +# define CONFIG_EXAMPLES_NXCONSOLE_STACKSIZE 2048 +#endif + /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS @@ -242,6 +268,7 @@ struct nxcon_state_s volatile bool haveres; /* True: Have screen resolution */ volatile bool connected; /* True: Connected to server */ sem_t eventsem; /* Control waiting for display events */ + pid_t pid; /* Console task ID */ NXHANDLE hnx; /* The connection handler */ NXTKWINDOW hwnd; /* The window */ NXCONSOLE hdrvr; /* The console driver */ |