Add nx_start() to simplify starting the NX server from within the RTOS

This commit is contained in:
Gregory Nutt 2013-12-29 11:11:48 -06:00
parent da660d1c6c
commit c0e26ad24c
3 changed files with 6 additions and 6 deletions

View File

@ -28,8 +28,7 @@ config NXWIDGETS_FLICKERFREE
config NXWIDGETS_EXTERNINIT
bool "External display Initialization"
default 0
depends on NXWIDGET_SERVERINIT
default n
---help---
Define to support external display initialization.
@ -44,6 +43,7 @@ config NXWIDGETS_DEVNO
config NXWIDGETS_VPLANE
int "Plane Number"
default 0
depends on !NX_LCDDRIVER && !NXWIDGETS_EXTERNINIT
---help---
Only a single video plane is supported. Default: 0

View File

@ -95,7 +95,7 @@ namespace NXWidgets
* serializes the multi-threaded accesses to the display.
*/
#ifdef CONFIG_NX_MULTIUSER
#if defined(CONFIG_NX_MULTIUSER) && defined(CONFIG_NXWIDGET_SERVERINIT)
static int server(int argc, char *argv[]);
#endif

View File

@ -201,7 +201,6 @@ bool CNxServer::connect(void)
{
struct sched_param param;
pthread_t thread;
pid_t serverId;
int ret;
// Set the client task priority
@ -218,8 +217,9 @@ bool CNxServer::connect(void)
// Start the server task
gvdbg("CNxServer::connect: Starting server task\n");
serverId = TASK_CREATE("NX Server", CONFIG_NXWIDGETS_SERVERPRIO,
CONFIG_NXWIDGETS_SERVERSTACK, server, (FAR char * const *)0);
pid_t serverId = TASK_CREATE("NX Server", CONFIG_NXWIDGETS_SERVERPRIO,
CONFIG_NXWIDGETS_SERVERSTACK, server,
(FAR char * const *)0);
if (serverId < 0)
{
gdbg("NxServer::connect: Failed to create nx_servertask task: %d\n", errno);