mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-24 00:20:11 +08:00
Add nx_start() to simplify starting the NX server from within the RTOS
This commit is contained in:
parent
da660d1c6c
commit
c0e26ad24c
4
Kconfig
4
Kconfig
@ -28,8 +28,7 @@ config NXWIDGETS_FLICKERFREE
|
|||||||
|
|
||||||
config NXWIDGETS_EXTERNINIT
|
config NXWIDGETS_EXTERNINIT
|
||||||
bool "External display Initialization"
|
bool "External display Initialization"
|
||||||
default 0
|
default n
|
||||||
depends on NXWIDGET_SERVERINIT
|
|
||||||
---help---
|
---help---
|
||||||
Define to support external display initialization.
|
Define to support external display initialization.
|
||||||
|
|
||||||
@ -44,6 +43,7 @@ config NXWIDGETS_DEVNO
|
|||||||
config NXWIDGETS_VPLANE
|
config NXWIDGETS_VPLANE
|
||||||
int "Plane Number"
|
int "Plane Number"
|
||||||
default 0
|
default 0
|
||||||
|
depends on !NX_LCDDRIVER && !NXWIDGETS_EXTERNINIT
|
||||||
---help---
|
---help---
|
||||||
Only a single video plane is supported. Default: 0
|
Only a single video plane is supported. Default: 0
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ namespace NXWidgets
|
|||||||
* serializes the multi-threaded accesses to the display.
|
* 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[]);
|
static int server(int argc, char *argv[]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -201,7 +201,6 @@ bool CNxServer::connect(void)
|
|||||||
{
|
{
|
||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
pid_t serverId;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
// Set the client task priority
|
// Set the client task priority
|
||||||
@ -218,8 +217,9 @@ bool CNxServer::connect(void)
|
|||||||
// Start the server task
|
// Start the server task
|
||||||
|
|
||||||
gvdbg("CNxServer::connect: Starting server task\n");
|
gvdbg("CNxServer::connect: Starting server task\n");
|
||||||
serverId = TASK_CREATE("NX Server", CONFIG_NXWIDGETS_SERVERPRIO,
|
pid_t serverId = TASK_CREATE("NX Server", CONFIG_NXWIDGETS_SERVERPRIO,
|
||||||
CONFIG_NXWIDGETS_SERVERSTACK, server, (FAR char * const *)0);
|
CONFIG_NXWIDGETS_SERVERSTACK, server,
|
||||||
|
(FAR char * const *)0);
|
||||||
if (serverId < 0)
|
if (serverId < 0)
|
||||||
{
|
{
|
||||||
gdbg("NxServer::connect: Failed to create nx_servertask task: %d\n", errno);
|
gdbg("NxServer::connect: Failed to create nx_servertask task: %d\n", errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user