apps/examples/nxterm: Most configuration options were not available in the Kconfig file.

This commit is contained in:
Gregory Nutt 2019-03-06 12:52:22 -06:00
parent c341abff35
commit 6529a8444a
3 changed files with 85 additions and 11 deletions

View File

@ -6,10 +6,77 @@
config EXAMPLES_NXTERM
tristate "NxTerm example"
default n
depends on NX
depends on NXTERM
select LIB_BOARDCTL
---help---
Enable the NxTerm example
if EXAMPLES_NXTERM
config EXAMPLES_NXTERM_PROGNAME
string "Program name"
default "nxterm"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be use when the NSH ELF
program is installed.
config EXAMPLES_NXTERM_PRIORITY
int "NxTerm task priority"
default 100
config EXAMPLES_NXTERM_STACKSIZE
int "NxTerm stack size"
default 2048
config EXAMPLES_NXTERM_LISTENERPRIO
int "Listener priority"
default 100
config EXAMPLES_NXTERM_CLIENTPRIO
int "Client priority"
default 100
config EXAMPLES_NXTERM_SERVERPRIO
int "Server priority"
default 120
config EXAMPLES_NXTERM_NOTIFYSIGNO
int "Notification signal"
default 4
range 1 31
config EXAMPLES_NXTERM_BPP
int "Pixel width"
default 16
range 1 32
---help---
The only valid selections are 1, 2, 4, 8, 16, and 32. The
corresponding NX disable selection (e.g., CONFIG_NX_DISABLE_16BPP),
must not be set.
config EXAMPLES_NXTERM_BGCOLOR
hex "Background color"
default 0x2211
config EXAMPLES_NXTERM_WCOLOR
hex "Window color"
default 0xcf1f
config EXAMPLES_NXTERM_TOOLBAR_HEIGHT
int "Toolbar height"
default 16
config EXAMPLES_NXTERM_TBCOLOR
hex "Toolbar color"
default 0xbdf7
config EXAMPLES_NXTERM_FONTID
int "Font ID"
default 16
config EXAMPLES_NXTERM_FONTCOLOR
hex "Font color"
default 0x0000
endif

View File

@ -41,14 +41,16 @@ ASRCS =
CSRCS = nxterm_toolbar.c nxterm_wndo.c nxterm_listener.c
MAINSRC = nxterm_main.c
CONFIG_XYZ_PROGNAME ?= nxterm$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
CONFIG_NXTERM_PROGNAME ?= nxterm$(EXEEXT)
PROGNAME = $(CONFIG_NXTERM_PROGNAME)
# NX built-in application info
APPNAME = nxterm
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
CONFIG_NXTERM_PRIORITY ?= SCHED_PRIORITY_DEFAULT
PRIORITY = $(CONFIG_NXTERM_PRIORITY)
CONFIG_NXTERM_STACKSIZE ?= 2048
STACKSIZE = $(CONFIG_NXTERM_STACKSIZE)
MODULE = CONFIG_EXAMPLES_NXTERM

View File

@ -75,12 +75,6 @@
# 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
@ -89,6 +83,17 @@
/* Pixel depth. If none provided, pick the smallest enabled pixel depth */
#if defined(CONFIG_EXAMPLES_NXTERM_BPP) && \
CONFIG_EXAMPLES_NXTERM_BPP != 1 && \
CONFIG_EXAMPLES_NXTERM_BPP != 2 && \
CONFIG_EXAMPLES_NXTERM_BPP != 4 && \
CONFIG_EXAMPLES_NXTERM_BPP != 8 && \
CONFIG_EXAMPLES_NXTERM_BPP != 16 && \
CONFIG_EXAMPLES_NXTERM_BPP != 32
# error Invalid selection for CONFIG_EXAMPLES_NXTERM_BPP
# undef CONFIG_EXAMPLES_NXTERM_BPP
#endif
#ifndef CONFIG_EXAMPLES_NXTERM_BPP
# if !defined(CONFIG_NX_DISABLE_1BPP)
# define CONFIG_EXAMPLES_NXTERM_BPP 1