diff --git a/ChangeLog b/ChangeLog index 9e5fe24708f..faa17d5bbf1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11376,7 +11376,7 @@ I2C_READ and I2C_WRITE which are not thread safe (2016-01-26). * SPI: Rename the STM32 up_spiinitialize() to stm32_spibus_initialize() (2016-01-26). - * SPI: Rename the SAM up_spiinitialize() to stm32_spibus_initialize() + * SPI: Rename the SAM up_spiinitialize() to sam_spibus_initialize() (2016-01-26). * SPI: Rename the Tiva up_spiinitialize() to tiva_spibus_intialize() (2016-01-26). @@ -11665,4 +11665,13 @@ complete, but untested and so not ready for primetime (2016-04-18). * configs/samv71-xult/vnc: Add a configuration that will be used to verify VNC (also untested) (2016-04-18). + * drivers/ioexpander: Fix an error in the PCA9555 driver: Under certain + error conditions, interrupts were not being re-enabled. Sebastien + Lorquet (2016-04-20). + * arch/arm/src/stm32 and configs/stm32f429i-disco: Correct some bad + commits that broke the LTDC display example. From Marco Krahl + (2016-04-22). + * configs/samv71-xult/vnwwm: Add a more complex NxWM configuration + to support further VNC testing (particularly of VNC keyboard and + mouse intputs). Initial configuration is not functional (2016-04-23). diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h index 02664a0ba90..d8fbe7346cc 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h @@ -329,11 +329,21 @@ # define GPIO_FSMC_NCE4_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN11) # define GPIO_FSMC_NIORD (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN6) # define GPIO_FSMC_NIOWR (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN8) +# define GPIO_FSMC_SDCKE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN2) +# define GPIO_FSMC_SDCKE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN3) +# define GPIO_FSMC_SDNE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN3) +# define GPIO_FSMC_SDNE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN2) +# define GPIO_FSMC_SDNWE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN0) +# define GPIO_FSMC_SDNWE_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN5) +# define GPIO_FSMC_SDNRAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN11) +# define GPIO_FSMC_SDCLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN8) +# define GPIO_FSMC_SDNCAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN15) +# define GPIO_FSMC_BA0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) +# define GPIO_FSMC_BA1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) # define GPIO_FSMC_NREG (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN7) #endif -#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) +#if defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) # define GPIO_FSMC_SDCKE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN3) # define GPIO_FSMC_SDCKE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN5) # define GPIO_FSMC_SDNE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN2) diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index 0ada8ad0109..f08af3deb4a 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -2206,25 +2206,25 @@ Configuration sub-directories The NxWM window manager can be found here: - nuttx-git/NxWidgets/nxwm + NxWidgets/nxwm The NxWM unit test can be found at: - nuttx-git/NxWidgets/UnitTests/nxwm + NxWidgets/UnitTests/nxwm Documentation for installing the NxWM unit test can be found here: - nuttx-git/NxWidgets/UnitTests/README.txt + NxWidgets/UnitTests/README.txt 2. Here is the quick summary of the build steps. These steps assume - that you have the entire NuttX GIT in some directory ~/nuttx-git. - You may have these components installed elsewhere. In that case, you + that you have the entire NuttX GIT in some directory HOME. You may + have these components installed elsewhere. In that case, you will need to adjust all of the paths in the following accordingly: - a. Install the nxwm configuration + a. Install the VNC nxwm configuration - $ cd ~/nuttx-git/nuttx/tools - $ ./configure.sh samv71-xult/nxwm + $ cd HOME/nuttx/tools + $ ./configure.sh samv71-xult/vnc b. Make the build context (only) @@ -2241,27 +2241,27 @@ Configuration sub-directories c. Install the nxwm unit test - $ cd ~/nuttx-git/NxWidgets - $ tools/install.sh ~/nuttx-git/apps nxwm + $ cd HOME/NxWidgets + $ tools/install.sh HOME/apps nxwm Creating symbolic link - - To ~/nuttx-git/NxWidgets/UnitTests/nxwm - - At ~/nuttx-git/apps/external + - To HOME/NxWidgets/UnitTests/nxwm + - At HOME/apps/external d. Build the NxWidgets library - $ cd ~/nuttx-git/NxWidgets/libnxwidgets - $ make TOPDIR=~/nuttx-git/nuttx + $ cd HOME/NxWidgets/libnxwidgets + $ make TOPDIR=HOME/nuttx ... e. Build the NxWM library - $ cd ~/nuttx-git/NxWidgets/nxwm - $ make TOPDIR=~/nuttx-git/nuttx + $ cd HOME/NxWidgets/nxwm + $ make TOPDIR=HOME/nuttx ... f. Built NuttX with the installed unit test as the application - $ cd ~/nuttx-git/nuttx + $ cd HOME/nuttx $ make 3. Reading from the LCD is not currently functional. The following @@ -2320,7 +2320,7 @@ Configuration sub-directories 1. Network configuration: IP address 10.0.0.2. The is easily changed via 'make menuconfig'. The VNC server address is 10.0.0.2:5900. - 2. The default (local) framebuffer configuration is 320x240 with 16-bit + 2. The default (local) framebuffer configuration is 320x240 with 8-bit RGB color. 3. There are complicated interactions between VNC and the network @@ -2328,7 +2328,7 @@ Configuration sub-directories size of update messages. That is 1024 bytes in that configuration (the full message with the header will be a little larger). The MTU (CONFIG_NET_ETH_MTU) is set to 590 so that a full update will - require several packets.i + require several packets. Write buffering also effects network performance. This will break up the large updates into small (196 byte) groups. When we run out @@ -2339,3 +2339,166 @@ Configuration sub-directories mouse/keyboard inputs in the options/input menu. That will make things a little clearer. + 5. To select 16-bits per pixel RGB15 5:6:5 + + CONFIG_NX_DISABLE_8BPP=y + # CONFIG_NX_DISABLE_16BPP is not set + + # CONFIG_VNCSERVER_COLORFMT_RGB8 is not set + CONFIG_VNCSERVER_COLORFMT_RGB16=y + + CONFIG_EXAMPLES_NXIMAGE_BPP=16 + + To re-select 8-bits per pixel RGB8 3:3:2 + + # CONFIG_NX_DISABLE_8BPP is not set + CONFIG_NX_DISABLE_16BPP=y + + CONFIG_VNCSERVER_COLORFMT_RGB8=y + # CONFIG_VNCSERVER_COLORFMT_RGB16 is not set + + # CONFIG_EXAMPLES_NXIMAGE_GREYSCALE is not set + CONFIG_EXAMPLES_NXIMAGE_BPP=8 + + STATUS: + 2016-04-21: I have gotten the apps/examples/nximage to work with + lots issues with 16-bit RGB and verbose GRAPHICS and UPDATER debug + ON. There are reliability problems and it hangs at the end of the + test. + + 2016-04-22: The default configuration now uses RGB8 which needs a lot + less SRAM for the local frame buffer and does not degrade the color + quality in the remote display (since it is also 8 BPP). At 8 + BPP, the remote display is correct even with both GRAPHICS and + UPDATER debug OFF -- and there is no hang! + + 2106-04-23: The NxImage test was selected because it is a very simple + graphics test. Continued testing, however, requires a more complex + configuration. Hence, the vnxwm configuration was created. + + A memory clobber error was fixed and this probably corrects some of + the reliability problems noted on 2016-04-21. + + vnxwm: + + This is a special configuration setup for the NxWM window manager + UnitTest. It provides an interactive windowing experience via a remote + VNC client window running on your PC. The SAMV71-XULT is connected to + the PC via Ethernet. + + NOTES: + + 1. The NxWM window manager is a tiny window manager tailored for use + with smaller LCDs. It supports a task, a start window, and + multiple application windows with toolbars. However, to make the + best use of the visible LCD space, only one application window is + visible at at time. + + The NxWM window manager can be found here: + + NxWidgets/nxwm + + The NxWM unit test can be found at: + + NxWidgets/UnitTests/nxwm + + Documentation for installing the NxWM unit test can be found here: + + NxWidgets/UnitTests/README.txt + + 2. Here is the quick summary of the build steps. These steps assume + that you have the entire NuttX GIT in some directory HOME. You may + have these components installed elsewhere. In that case, you + will need to adjust all of the paths in the following accordingly: + + a. Install the nxwm configuration + + $ cd HOME/nuttx/tools + $ ./configure.sh samv71-xult/nxwm + + b. Make the build context (only) + + $ cd .. + $ . ./setenv.sh + $ make context + ... + + NOTE: the use of the setenv.sh file is optional. All that it will + do is to adjust your PATH variable so that the build system can find + your tools. If you use it, you will most likely need to modify the + script so that it has the correct path to your tool binaries + directory. + + c. Install the nxwm unit test + + $ cd HOME/NxWidgets + $ tools/install.sh HOME/apps nxwm + Creating symbolic link + - To HOME/NxWidgets/UnitTests/nxwm + - At HOME/apps/external + + d. Build the NxWidgets library + + $ cd HOME/NxWidgets/libnxwidgets + $ make TOPDIR=HOME/nuttx + ... + + e. Build the NxWM library + + $ cd HOME/NxWidgets/nxwm + $ make TOPDIR=HOME/nuttx + ... + + f. Built NuttX with the installed unit test as the application + + $ cd HOME/nuttx + $ make + + 3. Network configuration: IP address 10.0.0.2. The is easily changed + via 'make menuconfig'. The VNC server address is 10.0.0.2:5900. + + 4. The default (local) framebuffer configuration is 320x240 with 8-bit + RGB color. + + I had some problems at 16-bits per pixle (see STATUS below). To + select 16-bits per pixel RGB15 5:6:5 + + CONFIG_NX_DISABLE_8BPP=y + # CONFIG_NX_DISABLE_16BPP is not set + + # CONFIG_VNCSERVER_COLORFMT_RGB8 is not set + CONFIG_VNCSERVER_COLORFMT_RGB16=y + + CONFIG_EXAMPLES_NXIMAGE_BPP=16 + + To re-select 8-bits per pixel RGB8 3:3:2 + + # CONFIG_NX_DISABLE_8BPP is not set + CONFIG_NX_DISABLE_16BPP=y + + CONFIG_VNCSERVER_COLORFMT_RGB8=y + # CONFIG_VNCSERVER_COLORFMT_RGB16 is not set + + # CONFIG_EXAMPLES_NXIMAGE_GREYSCALE is not set + CONFIG_EXAMPLES_NXIMAGE_BPP=8 + + 5. There are complicated interactions between VNC and the network + configuration. The CONFIG_VNCSERVER_UPDATE_BUFSIZE determines the + size of update messages. That is 1024 bytes in that configuration + (the full message with the header will be a little larger). The + MTU (CONFIG_NET_ETH_MTU) is set to 590 so that a full update will + require several packets. + + Write buffering also effects network performance. This will break + up the large updates into small (196 byte) groups. When we run out + of read-ahead buffers, then partial updates may be sent causing a + loss of synchronization. + + STATUS: + 2106-04-23: Configuration created. See status up to this data in + the vnc configuration. That probably all applies here as well. + + Only some initial testing has been performed: The configuration + does not work. No crashes or errors are reported, but the VNC + client window stays black. I have not yet dug into this. + \ No newline at end of file diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index 4399be73270..087f0b0f1d1 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -832,7 +832,7 @@ CONFIG_NET_IOB=y CONFIG_IOB_NBUFFERS=72 CONFIG_IOB_BUFSIZE=196 CONFIG_IOB_NCHAINS=8 -CONFIG_IOB_THROTTLE=8 +CONFIG_IOB_THROTTLE=32 # CONFIG_NET_ARCH_INCR32 is not set # CONFIG_NET_ARCH_CHKSUM is not set CONFIG_NET_STATISTICS=y @@ -901,20 +901,20 @@ CONFIG_FS_PROCFS=y CONFIG_NX=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 -# CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set CONFIG_NX_UPDATE=y # # Supported Pixel Depths # -# CONFIG_NX_DISABLE_1BPP is not set -# CONFIG_NX_DISABLE_2BPP is not set -# CONFIG_NX_DISABLE_4BPP is not set +CONFIG_NX_DISABLE_1BPP=y +CONFIG_NX_DISABLE_2BPP=y +CONFIG_NX_DISABLE_4BPP=y # CONFIG_NX_DISABLE_8BPP is not set -# CONFIG_NX_DISABLE_16BPP is not set -# CONFIG_NX_DISABLE_24BPP is not set +CONFIG_NX_DISABLE_16BPP=y +CONFIG_NX_DISABLE_24BPP=y CONFIG_NX_DISABLE_32BPP=y +CONFIG_NX_PACKEDMSFIRST=y # # Input Devices @@ -988,11 +988,13 @@ CONFIG_VNCSERVER=y # CONFIG_VNCSERVER_PROTO3p3 is not set CONFIG_VNCSERVER_PROTO3p8=y CONFIG_VNCSERVER_NDISPLAYS=1 +CONFIG_VNCSERVER_NAME="NuttX" CONFIG_VNCSERVER_PRIO=100 CONFIG_VNCSERVER_STACKSIZE=2048 CONFIG_VNCSERVER_UPDATER_PRIO=100 CONFIG_VNCSERVER_UPDATER_STACKSIZE=2048 -CONFIG_VNCSERVER_COLORFMT_RGB16=y +CONFIG_VNCSERVER_COLORFMT_RGB8=y +# CONFIG_VNCSERVER_COLORFMT_RGB16 is not set # CONFIG_VNCSERVER_COLORFMT_RGB32 is not set CONFIG_VNCSERVER_SCREENWIDTH=320 CONFIG_VNCSERVER_SCREENHEIGHT=240 @@ -1126,7 +1128,8 @@ CONFIG_EXAMPLES_NSH=y CONFIG_EXAMPLES_NXIMAGE=y CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 -CONFIG_EXAMPLES_NXIMAGE_BPP=16 +CONFIG_EXAMPLES_NXIMAGE_BPP=8 +# CONFIG_EXAMPLES_NXIMAGE_GREYSCALE is not set # CONFIG_EXAMPLES_NXIMAGE_XSCALEp5 is not set CONFIG_EXAMPLES_NXIMAGE_XSCALE1p0=y # CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5 is not set diff --git a/configs/samv71-xult/vnxwm/Make.defs b/configs/samv71-xult/vnxwm/Make.defs new file mode 100644 index 00000000000..fe4fd97aeb3 --- /dev/null +++ b/configs/samv71-xult/vnxwm/Make.defs @@ -0,0 +1,117 @@ +############################################################################ +# configs/samv71-xult/vnxwm/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +ifeq ($(CONFIG_ARMV7M_DTCM),y) + LDSCRIPT = flash-dtcm.ld +else + LDSCRIPT = flash-sram.ld +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = + diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig new file mode 100644 index 00000000000..3e074f27096 --- /dev/null +++ b/configs/samv71-xult/vnxwm/defconfig @@ -0,0 +1,1567 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +CONFIG_EXPERIMENTAL=y +# CONFIG_DEFAULT_SMALL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +# CONFIG_WINDOWS_NATIVE is not set +CONFIG_WINDOWS_CYGWIN=y +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +CONFIG_DEBUG_SYMBOLS=y +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +CONFIG_ARCH_CHIP_SAMV7=y +# CONFIG_ARCH_CHIP_STM32 is not set +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set +# CONFIG_ARCH_CORTEXM4 is not set +CONFIG_ARCH_CORTEXM7=y +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="samv7" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +CONFIG_ARMV7M_CMNVECTOR=y +CONFIG_ARMV7M_LAZYFPU=y +CONFIG_ARCH_HAVE_FPU=y +CONFIG_ARCH_HAVE_DPFPU=y +CONFIG_ARCH_FPU=y +CONFIG_ARCH_DPFPU=y +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +CONFIG_ARMV7M_HAVE_ICACHE=y +CONFIG_ARMV7M_HAVE_DCACHE=y +CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_DCACHE=y +CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y +CONFIG_ARMV7M_HAVE_ITCM=y +CONFIG_ARMV7M_HAVE_DTCM=y +# CONFIG_ARMV7M_ITCM is not set +# CONFIG_ARMV7M_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set +# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set +# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set +# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y +# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set +CONFIG_SDIO_DMA=y +# CONFIG_SDIO_WIDTH_D1_ONLY is not set + +# +# SAMV7 Configuration Options +# +# CONFIG_ARCH_CHIP_SAME70Q19 is not set +# CONFIG_ARCH_CHIP_SAME70Q20 is not set +# CONFIG_ARCH_CHIP_SAME70Q21 is not set +# CONFIG_ARCH_CHIP_SAME70N19 is not set +# CONFIG_ARCH_CHIP_SAME70N20 is not set +# CONFIG_ARCH_CHIP_SAME70N21 is not set +# CONFIG_ARCH_CHIP_SAME70J19 is not set +# CONFIG_ARCH_CHIP_SAME70J20 is not set +# CONFIG_ARCH_CHIP_SAME70J21 is not set +# CONFIG_ARCH_CHIP_SAMV71Q19 is not set +# CONFIG_ARCH_CHIP_SAMV71Q20 is not set +CONFIG_ARCH_CHIP_SAMV71Q21=y +# CONFIG_ARCH_CHIP_SAMV71N19 is not set +# CONFIG_ARCH_CHIP_SAMV71N20 is not set +# CONFIG_ARCH_CHIP_SAMV71N21 is not set +# CONFIG_ARCH_CHIP_SAMV71J19 is not set +# CONFIG_ARCH_CHIP_SAMV71J20 is not set +# CONFIG_ARCH_CHIP_SAMV71J21 is not set +# CONFIG_ARCH_CHIP_SAME70 is not set +# CONFIG_ARCH_CHIP_SAME70Q is not set +# CONFIG_ARCH_CHIP_SAME70N is not set +# CONFIG_ARCH_CHIP_SAME70J is not set +CONFIG_ARCH_CHIP_SAMV71=y +CONFIG_ARCH_CHIP_SAMV71Q=y +# CONFIG_ARCH_CHIP_SAMV71N is not set +# CONFIG_ARCH_CHIP_SAMV71J is not set +# CONFIG_SAMV7_MCAN is not set +CONFIG_SAMV7_HAVE_MCAN1=y +CONFIG_SAMV7_HAVE_DAC1=y +CONFIG_SAMV7_HAVE_EBI=y +CONFIG_SAMV7_EMAC=y +CONFIG_SAMV7_HSMCI=y +CONFIG_SAMV7_HAVE_HSMCI0=y +# CONFIG_SAMV7_HAVE_ISI8 is not set +CONFIG_SAMV7_HAVE_MEDIALB=y +CONFIG_SAMV7_HAVE_SDRAMC=y +CONFIG_SAMV7_HAVE_SPI0=y +CONFIG_SAMV7_HAVE_SPI1=y +# CONFIG_SAMV7_QSPI_IS_SPI is not set +# CONFIG_SAMV7_SSC is not set +# CONFIG_SAMV7_HAVE_TC is not set +CONFIG_SAMV7_HAVE_TWIHS2=y +# CONFIG_SAMV7_HAVE_USBFS is not set +CONFIG_SAMV7_HAVE_USBHS=y +CONFIG_SAMV7_HAVE_USART0=y +CONFIG_SAMV7_HAVE_USART1=y +CONFIG_SAMV7_HAVE_USART2=y +# CONFIG_SAMV7_SPI is not set +# CONFIG_SAMV7_SPI_MASTER is not set +# CONFIG_SAMV7_SPI_SLAVE is not set + +# +# SAMV7 Peripheral Selection +# +# CONFIG_SAMV7_ACC is not set +# CONFIG_SAMV7_ADC is not set +# CONFIG_SAMV7_AFEC0 is not set +# CONFIG_SAMV7_AFEC1 is not set +# CONFIG_SAMV7_MCAN0 is not set +# CONFIG_SAMV7_MCAN1 is not set +# CONFIG_SAMV7_DAC0 is not set +# CONFIG_SAMV7_DAC1 is not set +# CONFIG_SAMV7_EBI is not set +CONFIG_SAMV7_EMAC0=y +CONFIG_SAMV7_XDMAC=y +CONFIG_SAMV7_HSMCI0=y +# CONFIG_SAMV7_ISI is not set +# CONFIG_SAMV7_MLB is not set +# CONFIG_SAMV7_PWM0 is not set +# CONFIG_SAMV7_PWM1 is not set +# CONFIG_SAMV7_QSPI is not set +# CONFIG_SAMV7_RTC is not set +# CONFIG_SAMV7_RTT is not set +# CONFIG_SAMV7_SDRAMC is not set +# CONFIG_SAMV7_SMC is not set +# CONFIG_SAMV7_SPI0 is not set +# CONFIG_SAMV7_SPI1 is not set +# CONFIG_SAMV7_SSC0 is not set +# CONFIG_SAMV7_TC0 is not set +# CONFIG_SAMV7_TC1 is not set +# CONFIG_SAMV7_TC2 is not set +# CONFIG_SAMV7_TC3 is not set +# CONFIG_SAMV7_TRNG is not set +CONFIG_SAMV7_TWIHS0=y +# CONFIG_SAMV7_TWIHS1 is not set +# CONFIG_SAMV7_TWIHS2 is not set +# CONFIG_SAMV7_UART0 is not set +# CONFIG_SAMV7_UART1 is not set +# CONFIG_SAMV7_UART2 is not set +CONFIG_SAMV7_UART3=y +# CONFIG_SAMV7_UART4 is not set +# CONFIG_SAMV7_USBDEVHS is not set +# CONFIG_SAMV7_USBHOSTHS is not set +# CONFIG_SAMV7_USART0 is not set +# CONFIG_SAMV7_USART1 is not set +# CONFIG_SAMV7_USART2 is not set +# CONFIG_SAMV7_WDT is not set +# CONFIG_SAMV7_RSWDT is not set +CONFIG_SAMV7_GPIO_IRQ=y +CONFIG_SAMV7_GPIOA_IRQ=y +CONFIG_SAMV7_GPIOB_IRQ=y +# CONFIG_SAMV7_GPIOC_IRQ is not set +CONFIG_SAMV7_GPIOD_IRQ=y +# CONFIG_SAMV7_GPIOE_IRQ is not set +# CONFIG_SAMV7_PROGMEM is not set + +# +# TWIHS device driver options +# +CONFIG_SAMV7_TWIHS0_FREQUENCY=100000 + +# +# HSMCI device driver options +# +# CONFIG_SAMV7_HSMCI_RDPROOF is not set +# CONFIG_SAMV7_HSMCI_WRPROOF is not set +# CONFIG_SAMV7_HSMCI_UNALIGNED is not set + +# +# EMAC device driver options +# +CONFIG_SAMV7_EMAC0_NRXBUFFERS=16 +CONFIG_SAMV7_EMAC0_NTXBUFFERS=8 +CONFIG_SAMV7_EMAC0_PHYADDR=1 +# CONFIG_SAMV7_EMAC0_PHYINIT is not set +# CONFIG_SAMV7_EMAC0_MII is not set +CONFIG_SAMV7_EMAC0_RMII=y +CONFIG_SAMV7_EMAC0_AUTONEG=y +CONFIG_SAMV7_EMAC0_PHYSR=30 +CONFIG_SAMV7_EMAC0_PHYSR_ALTCONFIG=y +CONFIG_SAMV7_EMAC0_PHYSR_ALTMODE=0x7 +CONFIG_SAMV7_EMAC0_PHYSR_10HD=0x1 +CONFIG_SAMV7_EMAC0_PHYSR_100HD=0x2 +CONFIG_SAMV7_EMAC0_PHYSR_10FD=0x5 +CONFIG_SAMV7_EMAC0_PHYSR_100FD=0x6 +CONFIG_SAMV7_EMAC0_ISETH0=y +# CONFIG_SAMV7_EMAC_PREALLOCATE is not set +# CONFIG_SAMV7_EMAC_NBC is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +CONFIG_ARCH_DMA=y +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +# CONFIG_ARCH_HAVE_RESET is not set +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +CONFIG_ARCH_HAVE_RAMFUNCS=y +# CONFIG_ARCH_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=51262 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20400000 +CONFIG_RAM_SIZE=393216 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_SAMV71_XULT=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="samv71-xult" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_ARCH_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 + +# +# Board-Specific Options +# +# CONFIG_SAMV71XULT_MXTXPLND is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_ENVIRON is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2014 +CONFIG_START_MONTH=3 +CONFIG_START_DAY=10 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=32 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_SPINLOCK is not set +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nxwm_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +CONFIG_SCHED_HAVE_PARENT=y +# CONFIG_SCHED_CHILD_STATUS is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +CONFIG_SCHED_ONEXIT=y +CONFIG_SCHED_ONEXIT_MAX=1 +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCHLD=4 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=32 +CONFIG_MQ_MAXMSGSIZE=64 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=1526 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +# CONFIG_ARCH_HAVE_I2CRESET is not set +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +# CONFIG_I2C_POLLED is not set +# CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y +CONFIG_SPI=y +# CONFIG_SPI_SLAVE is not set +CONFIG_SPI_EXCHANGE=y +# CONFIG_SPI_CMDDATA is not set +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_TIMERS_CS2100CP is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +CONFIG_MMCSD=y +CONFIG_MMCSD_NSLOTS=1 +# CONFIG_MMCSD_READONLY is not set +CONFIG_MMCSD_MULTIBLOCK_DISABLE=y +# CONFIG_MMCSD_MMCSUPPORT is not set +CONFIG_MMCSD_HAVECARDDETECT=y +# CONFIG_MMCSD_SPI is not set +CONFIG_ARCH_HAVE_SDIO=y +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +CONFIG_MMCSD_SDIO=y +# CONFIG_SDIO_PREFLIGHT is not set +# CONFIG_SDIO_MUXBUS is not set +CONFIG_SDIO_BLOCKSETUP=y +# CONFIG_MODEM is not set +CONFIG_MTD=y + +# +# MTD Configuration +# +# CONFIG_MTD_PARTITION is not set +# CONFIG_MTD_SECT512 is not set +# CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set +CONFIG_MTD_CONFIG=y +# CONFIG_MTD_CONFIG_RAM_CONSOLIDATE is not set +CONFIG_MTD_CONFIG_ERASEDVALUE=0xff + +# +# MTD Device Drivers +# +# CONFIG_MTD_NAND is not set +# CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set +CONFIG_MTD_AT24XX=y +# CONFIG_AT24XX_MULTI is not set +CONFIG_AT24XX_SIZE=2 +CONFIG_AT24XX_ADDR=0x57 +CONFIG_AT24XX_EXTENDED=y +CONFIG_AT24XX_EXTSIZE=160 +CONFIG_AT24XX_FREQUENCY=100000 +CONFIG_MTD_AT25=y +CONFIG_AT25_SPIMODE=0 +CONFIG_AT25_SPIFREQUENCY=20000000 +# CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_M25P is not set +# CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set +# CONFIG_MTD_SMART is not set +# CONFIG_MTD_RAMTRON is not set +# CONFIG_MTD_SST25 is not set +# CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST39FV is not set +# CONFIG_MTD_W25 is not set +# CONFIG_EEPROM is not set +CONFIG_NETDEVICES=y + +# +# General Ethernet MAC Driver Options +# +# CONFIG_NETDEV_LOOPBACK is not set +CONFIG_NETDEV_TELNET=y +CONFIG_TELNET_RXBUFFER_SIZE=256 +CONFIG_TELNET_TXBUFFER_SIZE=256 +# CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +CONFIG_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set + +# +# External Ethernet MAC Device Support +# +# CONFIG_NET_DM90x0 is not set +# CONFIG_NET_CS89x0 is not set +# CONFIG_ENC28J60 is not set +# CONFIG_ENCX24J600 is not set +# CONFIG_NET_E1000 is not set +# CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set +# CONFIG_NET_VNET is not set + +# +# External Ethernet PHY Device Support +# +CONFIG_ARCH_PHY_INTERRUPT=y +# CONFIG_ETH0_PHY_NONE is not set +# CONFIG_ETH0_PHY_AM79C874 is not set +# CONFIG_ETH0_PHY_KS8721 is not set +# CONFIG_ETH0_PHY_KSZ8041 is not set +# CONFIG_ETH0_PHY_KSZ8051 is not set +CONFIG_ETH0_PHY_KSZ8061=y +# CONFIG_ETH0_PHY_KSZ8081 is not set +# CONFIG_ETH0_PHY_KSZ90x1 is not set +# CONFIG_ETH0_PHY_DP83848C is not set +# CONFIG_ETH0_PHY_LAN8720 is not set +# CONFIG_ETH0_PHY_LAN8740 is not set +# CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set +# CONFIG_ETH0_PHY_DM9161 is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_ARCH_HAVE_UART is not set +# CONFIG_ARCH_HAVE_UART0 is not set +# CONFIG_ARCH_HAVE_UART1 is not set +# CONFIG_ARCH_HAVE_UART2 is not set +CONFIG_ARCH_HAVE_UART3=y +# CONFIG_ARCH_HAVE_UART4 is not set +# CONFIG_ARCH_HAVE_UART5 is not set +# CONFIG_ARCH_HAVE_UART6 is not set +# CONFIG_ARCH_HAVE_UART7 is not set +# CONFIG_ARCH_HAVE_UART8 is not set +# CONFIG_ARCH_HAVE_SCI0 is not set +# CONFIG_ARCH_HAVE_SCI1 is not set +# CONFIG_ARCH_HAVE_USART0 is not set +# CONFIG_ARCH_HAVE_USART1 is not set +# CONFIG_ARCH_HAVE_USART2 is not set +# CONFIG_ARCH_HAVE_USART3 is not set +# CONFIG_ARCH_HAVE_USART4 is not set +# CONFIG_ARCH_HAVE_USART5 is not set +# CONFIG_ARCH_HAVE_USART6 is not set +# CONFIG_ARCH_HAVE_USART7 is not set +# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_ARCH_HAVE_OTHER_UART is not set + +# +# USART Configuration +# +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_UART3_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# UART3 Configuration +# +CONFIG_UART3_RXBUFSIZE=256 +CONFIG_UART3_TXBUFSIZE=256 +CONFIG_UART3_BAUD=115200 +CONFIG_UART3_BITS=8 +CONFIG_UART3_PARITY=0 +CONFIG_UART3_2STOP=0 +# CONFIG_UART3_IFLOWCONTROL is not set +# CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +CONFIG_ARCH_HAVE_NET=y +CONFIG_ARCH_HAVE_PHY=y +CONFIG_NET=y +CONFIG_NET_NOINTS=y +# CONFIG_NET_PROMISCUOUS is not set + +# +# Driver buffer configuration +# +# CONFIG_NET_MULTIBUFFER is not set +CONFIG_NET_ETH_MTU=590 +CONFIG_NET_ETH_TCP_RECVWNDO=536 +CONFIG_NET_GUARDSIZE=2 + +# +# Data link support +# +# CONFIG_NET_MULTILINK is not set +# CONFIG_NET_USER_DEVFMT is not set +CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set + +# +# Network Device Operations +# +CONFIG_NETDEV_PHY_IOCTL=y + +# +# Internet Protocol Selection +# +CONFIG_NET_IPv4=y +# CONFIG_NET_IPv6 is not set + +# +# Socket Support +# +CONFIG_NSOCKET_DESCRIPTORS=8 +CONFIG_NET_NACTIVESOCKETS=16 +CONFIG_NET_SOCKOPTS=y +# CONFIG_NET_SOLINGER is not set + +# +# Raw Socket Support +# +# CONFIG_NET_PKT is not set + +# +# Unix Domain Socket Support +# +# CONFIG_NET_LOCAL is not set + +# +# TCP/IP Networking +# +CONFIG_NET_TCP=y +# CONFIG_NET_TCPURGDATA is not set +# CONFIG_NET_TCP_REASSEMBLY is not set +CONFIG_NET_TCP_CONNS=8 +CONFIG_NET_MAX_LISTENPORTS=20 +CONFIG_NET_TCP_READAHEAD=y +CONFIG_NET_TCP_WRITE_BUFFERS=y +CONFIG_NET_TCP_NWRBCHAINS=8 +CONFIG_NET_TCP_RECVDELAY=0 +CONFIG_NET_TCPBACKLOG=y +# CONFIG_NET_SENDFILE is not set + +# +# UDP Networking +# +# CONFIG_NET_UDP is not set + +# +# ICMP Networking Support +# +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y + +# +# IGMPv2 Client Support +# +# CONFIG_NET_IGMP is not set + +# +# ARP Configuration +# +CONFIG_NET_ARP=y +CONFIG_NET_ARPTAB_SIZE=16 +CONFIG_NET_ARP_MAXAGE=120 +# CONFIG_NET_ARP_IPIN is not set +CONFIG_NET_ARP_SEND=y +CONFIG_ARP_SEND_MAXTRIES=5 +CONFIG_ARP_SEND_DELAYMSEC=20 + +# +# Network I/O Buffer Support +# +CONFIG_NET_IOB=y +CONFIG_IOB_NBUFFERS=72 +CONFIG_IOB_BUFSIZE=196 +CONFIG_IOB_NCHAINS=8 +CONFIG_IOB_THROTTLE=32 +# CONFIG_NET_ARCH_INCR32 is not set +# CONFIG_NET_ARCH_CHKSUM is not set +CONFIG_NET_STATISTICS=y + +# +# Routing Table Configuration +# +# CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="SAMV71-XULT" + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FAT_FORCE_INDIRECT is not set +# CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FAT_DIRECT_RETRY is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_PROCFS_EXCLUDE_NET is not set +# CONFIG_FS_PROCFS_EXCLUDE_MTD is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +CONFIG_NX=y +CONFIG_NX_NPLANES=1 +CONFIG_NX_BGCOLOR=0xbb +# CONFIG_NX_WRITEONLY is not set +CONFIG_NX_UPDATE=y + +# +# Supported Pixel Depths +# +CONFIG_NX_DISABLE_1BPP=y +CONFIG_NX_DISABLE_2BPP=y +CONFIG_NX_DISABLE_4BPP=y +# CONFIG_NX_DISABLE_8BPP is not set +CONFIG_NX_DISABLE_16BPP=y +CONFIG_NX_DISABLE_24BPP=y +CONFIG_NX_DISABLE_32BPP=y +CONFIG_NX_PACKEDMSFIRST=y + +# +# Input Devices +# +CONFIG_NX_XYINPUT=y +# CONFIG_NX_XYINPUT_NONE is not set +CONFIG_NX_XYINPUT_MOUSE=y +# CONFIG_NX_XYINPUT_TOUCHSCREEN is not set +CONFIG_NX_KBD=y + +# +# Framed Window Borders +# +CONFIG_NXTK_BORDERWIDTH=4 +CONFIG_NXTK_DEFAULT_BORDERCOLORS=y +# CONFIG_NXTK_AUTORAISE is not set + +# +# Font Selections +# +CONFIG_NXFONTS_CHARBITS=7 +# CONFIG_NXFONT_MONO5X8 is not set +# CONFIG_NXFONT_SANS17X22 is not set +# CONFIG_NXFONT_SANS20X26 is not set +CONFIG_NXFONT_SANS23X27=y +# CONFIG_NXFONT_SANS22X29 is not set +# CONFIG_NXFONT_SANS28X37 is not set +# CONFIG_NXFONT_SANS39X48 is not set +# CONFIG_NXFONT_SANS17X23B is not set +# CONFIG_NXFONT_SANS20X27B is not set +CONFIG_NXFONT_SANS22X29B=y +# CONFIG_NXFONT_SANS28X37B is not set +# CONFIG_NXFONT_SANS40X49B is not set +# CONFIG_NXFONT_SERIF22X29 is not set +# CONFIG_NXFONT_SERIF29X37 is not set +# CONFIG_NXFONT_SERIF38X48 is not set +# CONFIG_NXFONT_SERIF22X28B is not set +# CONFIG_NXFONT_SERIF27X38B is not set +# CONFIG_NXFONT_SERIF38X49B is not set +# CONFIG_NXFONT_PIXEL_UNICODE is not set +# CONFIG_NXFONT_PIXEL_LCD_MACHINE is not set +# CONFIG_NXFONT_X11_MISC_FIXED_4X6 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_5X7 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_5X8 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X9 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X10 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X12 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X14 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X14B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X15 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X15B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X18 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X18B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_10X20 is not set +CONFIG_NXTERM=y + +# +# NxTerm Output Text/Graphics Options +# +CONFIG_NXTERM_BPP=8 +CONFIG_NXTERM_CURSORCHAR=137 +CONFIG_NXTERM_MXCHARS=396 +CONFIG_NXTERM_CACHESIZE=32 +CONFIG_NXTERM_LINESEPARATION=0 +# CONFIG_NXTERM_NOWRAP is not set + +# +# NxTerm Input options +# +CONFIG_NXTERM_NXKBDIN=y +CONFIG_NXTERM_KBDBUFSIZE=16 +CONFIG_NXTERM_NPOLLWAITERS=4 + +# +# NX Multi-user only options +# +CONFIG_NX_MULTIUSER=y +CONFIG_NX_BLOCKING=y +CONFIG_NX_MXSERVERMSGS=32 +CONFIG_NX_MXCLIENTMSGS=16 +# CONFIG_NX_NXSTART is not set +CONFIG_VNCSERVER=y +# CONFIG_VNCSERVER_PROTO3p3 is not set +CONFIG_VNCSERVER_PROTO3p8=y +CONFIG_VNCSERVER_NDISPLAYS=1 +CONFIG_VNCSERVER_NAME="NuttX" +CONFIG_VNCSERVER_PRIO=100 +CONFIG_VNCSERVER_STACKSIZE=2048 +CONFIG_VNCSERVER_UPDATER_PRIO=100 +CONFIG_VNCSERVER_UPDATER_STACKSIZE=2048 +CONFIG_VNCSERVER_COLORFMT_RGB8=y +# CONFIG_VNCSERVER_COLORFMT_RGB16 is not set +# CONFIG_VNCSERVER_COLORFMT_RGB32 is not set +CONFIG_VNCSERVER_SCREENWIDTH=320 +CONFIG_VNCSERVER_SCREENHEIGHT=240 +CONFIG_VNCSERVER_NUPDATES=48 +CONFIG_VNCSERVER_UPDATE_BUFSIZE=1024 +CONFIG_VNCSERVER_INBUFFER_SIZE=80 +# CONFIG_VNCCLIENT is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# +# CONFIG_WIRELESS is not set + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +CONFIG_LIBM=y +# CONFIG_NOPRINTF_FIELDWIDTH is not set +CONFIG_LIBC_FLOATINGPOINT=y +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +CONFIG_LIBC_NETDB=y +# CONFIG_NETDB_HOSTFILE is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_CXXTEST is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NETTEST is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +# CONFIG_EXAMPLES_NSH is not set +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set +CONFIG_NETUTILS_TELNETD=y +CONFIG_NETUTILS_NETLIB=y +CONFIG_NETUTILS_WEBCLIENT=y +CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" +CONFIG_WEBCLIENT_TIMEOUT=10 +# CONFIG_NETUTILS_WEBSERVER is not set +# CONFIG_NETUTILS_XMLRPC is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +CONFIG_NSH_MOTD=y +# CONFIG_NSH_PLATFORM_MOTD is not set +CONFIG_NSH_MOTD_STRING="VNC Server at 10.0.0.2:5900" + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set +# CONFIG_NSH_DISABLE_BASENAME 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_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME 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_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# 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_MV is not set +# CONFIG_NSH_DISABLE_MW 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_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME 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=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +CONFIG_NSH_ARCHINIT=y + +# +# Networking Configuration +# +CONFIG_NSH_NETINIT_THREAD=y +CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 +CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 + +# +# IP Address Configuration +# + +# +# IPv4 Addresses +# +CONFIG_NSH_IPADDR=0x0a000002 +CONFIG_NSH_DRIPADDR=0x0a000001 +CONFIG_NSH_NETMASK=0xffffff00 +# CONFIG_NSH_NOMAC is not set +CONFIG_NSH_MAX_ROUNDTRIP=20 + +# +# Telnet Configuration +# +CONFIG_NSH_TELNET=y +CONFIG_NSH_TELNETD_PORT=23 +CONFIG_NSH_TELNETD_DAEMONPRIO=100 +CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 +CONFIG_NSH_TELNETD_CLIENTPRIO=100 +CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 +CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set +# CONFIG_NSH_TELNET_LOGIN is not set + +# +# NxWidgets/NxWM +# +CONFIG_NXWIDGETS=y + +# +# NX Server/Device Configuration +# +# CONFIG_NXWIDGETS_FLICKERFREE is not set +# CONFIG_NXWIDGETS_EXTERNINIT is not set +CONFIG_NXWIDGETS_VPLANE=0 +CONFIG_NXWIDGET_SERVERINIT=y +CONFIG_NXWIDGETS_SERVERPRIO=110 +CONFIG_NXWIDGETS_SERVERSTACK=2048 +CONFIG_NXWIDGETS_CLIENTPRIO=100 +CONFIG_NXWIDGETS_LISTENERPRIO=100 +CONFIG_NXWIDGETS_LISTENERSTACK=2048 +# CONFIG_NXWIDGET_EVENTWAIT is not set + +# +# NXWidget Configuration +# +CONFIG_NXWIDGETS_BPP=8 +# CONFIG_NXWIDGETS_GREYSCALE is not set +CONFIG_NXWIDGETS_SIZEOFCHAR=1 + +# +# NXWidget Default Values +# +# CONFIG_NXWIDGETS_SYSTEM_CUSTOM_FONTID is not set +CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE=16 +CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT=8 +# CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS is not set +# CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS is not set +# CONFIG_NXWIDGETS_CUSTOM_TEXTCOLORS is not set +CONFIG_NXWIDGETS_TRANSPARENT_COLOR=0x0 + +# +# Keypad behavior +# +CONFIG_NXWIDGETS_FIRST_REPEAT_TIME=500 +CONFIG_NXWIDGETS_CONTINUE_REPEAT_TIME=200 +CONFIG_NXWIDGETS_DOUBLECLICK_TIME=350 +CONFIG_NXWIDGETS_KBDBUFFER_SIZE=16 +CONFIG_NXWIDGETS_CURSORCONTROL_SIZE=4 +# CONFIG_NXWIDGET_MEMMONITOR is not set +CONFIG_NXWM=y + +# +# NxWM General Settings +# +# CONFIG_NXWM_LARGE_ICONS is not set +CONFIG_NXWM_CUSTOM_FONTID=y +CONFIG_NXWM_DEFAULT_FONTID=5 +CONFIG_NXWM_UNITTEST=y + +# +# Color configuration +# +# CONFIG_NXWM_CUSTOM_FILLCOLORS is not set +# CONFIG_NXWM_CUSTOM_EDGECOLORS is not set +# CONFIG_NXWM_CUSTOM_TEXTCOLORS is not set + +# +# Background Image +# +# CONFIG_NXWM_DISABLE_BACKGROUND_IMAGE is not set +CONFIG_NXWM_BACKGROUND_IMAGE="NXWidgets::g_nuttxBitmap160x160" + +# +# NxWM Taskbar Configuration +# + +# +# Horizontal and vertical spacing of icons in the task bar +# +CONFIG_NXWM_TASKBAR_VSPACING=4 +CONFIG_NXWM_TASKBAR_HSPACING=4 +# CONFIG_NXWM_TASKBAR_TOP is not set +# CONFIG_NXWM_TASKBAR_BOTTOM is not set +CONFIG_NXWM_TASKBAR_LEFT=y +# CONFIG_NXWM_TASKBAR_RIGHT is not set +# CONFIG_NXWM_CUSTOM_TASKBAR_WIDTH is not set +# CONFIG_NXWM_TASKBAR_ICONSCALE is not set +# CONFIG_NXWM_DISABLE_MINIMIZE is not set +# CONFIG_NXWM_TASKBAR_NO_BORDER is not set + +# +# NxWM Toolbar Configuration +# +# CONFIG_NXWM_CUSTOM_TOOLBAR_HEIGHT is not set +CONFIG_NXWM_TOOLBAR_CUSTOM_FONTID=y +CONFIG_NXWM_TOOLBAR_FONTID=5 + +# +# NxWM Application Window Configuration +# +# CONFIG_NXWM_CUSTOM_APPWINDOW_ICONS is not set + +# +# NxWM Start Window Configuration +# + +# +# Horizontal and vertical spacing of icons in the task bar +# +CONFIG_NXWM_STARTWINDOW_VSPACING=4 +CONFIG_NXWM_STARTWINDOW_HSPACING=4 +# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set +CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm" +CONFIG_NXWM_STARTWINDOW_MXMSGS=32 +CONFIG_NXWM_STARTWINDOW_MXMPRIO=42 +CONFIG_NXWM_STARTWINDOW_PRIO=100 +CONFIG_NXWM_STARTWINDOW_STACKSIZE=2048 + +# +# NxTerm Window Settings +# +CONFIG_NXWM_NXTERM=y +CONFIG_NXWM_NXTERM_PRIO=100 +CONFIG_NXWM_NXTERM_STACKSIZE=2048 +# CONFIG_NXWM_NXTERM_CUSTOM_COLORS is not set +# CONFIG_NXWM_NXTERM_CUSTOM_FONTID is not set +# CONFIG_NXWM_CUSTOM_NXTERM_ICON is not set + +# +# NxWM Touchscreen Configuration +# +# CONFIG_NXWM_TOUCHSCREEN is not set + +# +# NxWM Keyboard Configuration +# +CONFIG_NXWM_KEYBOARD=y + +# +# Keyboard Device Settings +# +CONFIG_NXWM_KEYBOARD_DEVPATH="/dev/console" +# CONFIG_NXWM_KEYBOARD_USBHOST is not set +CONFIG_NXWM_KEYBOARD_SIGNO=6 +CONFIG_NXWM_KEYBOARD_BUFSIZE=16 +CONFIG_NXWM_KEYBOARD_LISTENERPRIO=120 +CONFIG_NXWM_KEYBOARD_LISTENERSTACK=2048 + +# +# NxWM Calibration Display Settings +# +CONFIG_NXWM_CALIBRATION_MARGIN=40 +# CONFIG_NXWM_CALIBRATION_CUSTOM_COLORS is not set +CONFIG_NXWM_CALIBRATION_MESSAGES=y +CONFIG_NXWM_CALIBRATION_CUSTOM_FONTID=y +CONFIG_NXWM_CALIBRATION_FONTID=5 +CONFIG_NXWM_CALIBRATION_AVERAGE=y +CONFIG_NXWM_CALIBRATION_NSAMPLES=2 +# CONFIG_NXWM_CALIBRATION_DISCARD_MINMAX is not set +# CONFIG_NXWM_CALIBRATION_ANISOTROPIC is not set +# CONFIG_NXWM_CUSTOM_CALIBRATION_ICON is not set +CONFIG_NXWM_CALIBRATION_SIGNO=5 +CONFIG_NXWM_CALIBRATION_LISTENERPRIO=100 +CONFIG_NXWM_CALIBRATION_LISTENERSTACK=2048 + +# +# NxWM Hex Calculator Display Settings +# +# CONFIG_NXWM_HEXCALCULATOR_CUSTOM_COLORS is not set +# CONFIG_NXWM_CUSTOM_HEXCALCULATOR_ICON is not set +CONFIG_NXWM_HEXCALCULATOR_CUSTOM_FONTID=y +CONFIG_NXWM_HEXCALCULATOR_FONTID=5 + +# +# NxWM Media Player Display Settings +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_NETDB is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_MDIO is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/vnxwm/setenv.sh b/configs/samv71-xult/vnxwm/setenv.sh new file mode 100644 index 00000000000..c3756d2330d --- /dev/null +++ b/configs/samv71-xult/vnxwm/setenv.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# configs/samv7-xult/vnxwm/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the Atmel GCC +# toolchain under Windows. You will also have to edit this if you install +# this toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin" + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index 5187aa411f2..c6afc355284 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -50,6 +50,10 @@ #include #include +#ifdef CONFIG_VNCSERVER +# include +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -130,6 +134,17 @@ int board_tsc_setup(int minor) goto errout_with_fb; } +#ifdef CONFIG_VNCSERVER + /* Setup the VNC server to support keyboard/mouse inputs */ + + ret = vnc_default_fbinitialize(0, g_simtc.hnx); + if (ret < 0) + { + idbg("vnc_default_fbinitialize failed: %d\n", ret); + goto errout_with_fb; + } +#endif + /* Set the background to the configured background color */ ivdbg("Set background color=%d\n", CONFIG_EXAMPLES_TOUCHSCREEN_BGCOLOR); diff --git a/configs/stm32f429i-disco/src/stm32_ili93414ws.c b/configs/stm32f429i-disco/src/stm32_ili93414ws.c index aea55ea8d63..58dad6eae23 100644 --- a/configs/stm32f429i-disco/src/stm32_ili93414ws.c +++ b/configs/stm32f429i-disco/src/stm32_ili93414ws.c @@ -69,6 +69,10 @@ /* spi frequency based on arch/arm/src/stm32/stm32_spi.c */ +#ifndef CONFIG_STM32F429I_DISCO_ILI9341_SPIFREQUENCY +# define CONFIG_STM32F429I_DISCO_ILI9341_SPIFREQUENCY 20000000 +#endif + #if CONFIG_STM32F429I_DISCO_ILI9341_SPIFREQUENCY >= \ (STM32_PCLK1_FREQUENCY >> 1) # define ILI93414WS_SPI_BR SPI_CR1_FPCLCKd2 /* 000: fPCLK/2 */ diff --git a/graphics/nxmu/nx_start.c b/graphics/nxmu/nx_start.c index 78e98132ee6..814dc5a70cf 100644 --- a/graphics/nxmu/nx_start.c +++ b/graphics/nxmu/nx_start.c @@ -53,22 +53,6 @@ #ifdef CONFIG_NX_NXSTART -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/graphics/vnc/server/Kconfig b/graphics/vnc/server/Kconfig index a7ea00c2613..157b62dfc91 100644 --- a/graphics/vnc/server/Kconfig +++ b/graphics/vnc/server/Kconfig @@ -118,13 +118,29 @@ config VNCSERVER_UPDATE_BUFSIZE config VNCSERVER_KBDENCODE bool "Encode keyboard input" default n - depends on NXTERM_NXKBDIN + depends on LIB_KBDCODEC ---help--- Use a special encoding of keyboard characters as defined in include/nuttx/input/kbd_coded.h. config VNCSERVER_INBUFFER_SIZE - int "Input buffer size + int "Input buffer size" default 80 +config VNCSERVER_DEBUG + bool "VNC Server debug" + default n + depends on DEBUG && !DEBUG_GRAPHICS + ---help--- + Normally VNC debug output is selected with DEBUG_GRAPHICS. The VNC + server server suupport this special option to enable GRAPHICS debug + output for the VNC server while GRAPHICS debug is disabled. This + provides an cleaner, less cluttered output when you only wish to + debug the VNC server versus enabling DEBUG_GRAPHICS globally. + +config VNCSERVER_UPDATE_DEBUG + bool "Detailed updater debug" + default n + depends on DEBUG_GRAPHICS || VNCSERVER_DEBUG + endif # VNCSERVER diff --git a/graphics/vnc/server/vnc_color.c b/graphics/vnc/server/vnc_color.c index 597b9686d67..8543cf7866e 100644 --- a/graphics/vnc/server/vnc_color.c +++ b/graphics/vnc/server/vnc_color.c @@ -265,9 +265,14 @@ uint32_t vnc_convert_rgb32_888(lfb_color_t rgb) * Name: vnc_colors * * Description: - * Test the update rectangle to see if it contains complex colors. If it - * contains only a few colors, then it may be a candidate for some type - * run-length encoding. + * Test the update rectangle to see if it contains complex colors. If it + * contains only a few colors, then it may be a candidate for some type + * run-length encoding. + * + * REVISIT: This function is imperfect: It will fail if there are more + * than 8 colors in the region. For small colors, we can keep a local + * array for all color formats and always return the exact result, no + * matter now many colors. * * Input Parameters: * session - An instance of the session structure. @@ -280,15 +285,13 @@ uint32_t vnc_convert_rgb32_888(lfb_color_t rgb) * The number of valid colors in the colors[] array are returned, the * first entry being the most frequent. A negated errno value is returned * if the colors cannot be determined. This would be the case if the color - * depth is > 8 and there are more than 'maxcolors' colors in the update - * rectangle. + * there are more than 'maxcolors' colors in the update rectangle. * ****************************************************************************/ int vnc_colors(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect, unsigned int maxcolors, FAR lfb_color_t *colors) { -#if RFB_PIXELDEPTH > 8 FAR const lfb_color_t *rowstart; FAR const lfb_color_t *pixptr; lfb_color_t pixel; @@ -412,12 +415,4 @@ int vnc_colors(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect, /* And return the number of colors that we found */ return ncolors; - -#else - /* For small colors, we can keep a local array for all color formats and - * always return the exact result, no matter now many colors. OR we could - * just remove this conditional compilation and live with 8 colors max. - */ -# error No support for small colors -#endif } diff --git a/graphics/vnc/server/vnc_fbdev.c b/graphics/vnc/server/vnc_fbdev.c index 87fb91b84d8..36337cf2737 100644 --- a/graphics/vnc/server/vnc_fbdev.c +++ b/graphics/vnc/server/vnc_fbdev.c @@ -43,11 +43,20 @@ #include #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #include #include #include +#include #include "vnc_server.h" @@ -158,7 +167,9 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, DEBUGASSERT(fbinfo != NULL && vinfo != NULL); if (fbinfo != NULL && vinfo != NULL) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -197,7 +208,9 @@ static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, DEBUGASSERT(fbinfo != NULL && pinfo != NULL && planeno == 0); if (fbinfo != NULL && pinfo != NULL && planeno == 0) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -242,7 +255,9 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, if (fbinfo != NULL && cmap != NULL) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -277,7 +292,9 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s if (fbinfo != NULL && cmap != NULL) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -313,7 +330,9 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable, if (fbinfo != NULL && attrib != NULL) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -347,7 +366,9 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, if (fbinfo != NULL && settings != NULL) { - session = vnc_find_session(fbinfo->display); + DEBUGASSERT(fbinfo->display >= 0 && fbinfo->display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[fbinfo->display]; + if (session == NULL || session->state != VNCSERVER_RUNNING) { gdbg("ERROR: session is not connected\n"); @@ -381,7 +402,121 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, #endif /**************************************************************************** - * Name: vnc_wait_server + * Name: vnc_start_server + * + * Description: + * Start the VNC server. + * + * Input parameters: + * display - In the case of hardware with multiple displays, this + * specifies the display. Normally this is zero. + * + * Returned Value: + * Zero is returned on success; a negated errno value is returned on any + * failure. + * + ****************************************************************************/ + +static int vnc_start_server(int display) +{ + FAR char *argv[2]; + char str[8]; + pid_t pid; + + DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); + + /* Check if the server is already running */ + + if (g_vnc_sessions[display] != NULL) + { + DEBUGASSERT(g_vnc_sessions[display]->state >= VNCSERVER_INITIALIZED); + return OK; + } + + /* Start the VNC server kernel thread. */ + + gvdbg("Starting the VNC server for display %d\n", display); + + g_fbstartup[display].result = -EBUSY; + sem_reset(&g_fbstartup[display].fbinit, 0); + sem_reset(&g_fbstartup[display].fbconnect, 0); + + /* Format the kernel thread arguments (ASCII.. yech) */ + + (void)itoa(display, str, 10); + argv[0] = str; + argv[1] = NULL; + + pid = kernel_thread("vnc_server", CONFIG_VNCSERVER_PRIO, + CONFIG_VNCSERVER_STACKSIZE, + (main_t)vnc_server, argv); + if (pid < 0) + { + gdbg("ERROR: Failed to start the VNC server: %d\n", (int)pid); + return (int)pid; + } + + return OK; +} + +/**************************************************************************** + * Name: vnc_wait_start + * + * Description: + * Wait for the server to be started. + * + * Input parameters: + * display - In the case of hardware with multiple displays, this + * specifies the display. Normally this is zero. + * + * Returned Value: + * Zero is returned on success; a negated errno value is returned on any + * failure. + * + ****************************************************************************/ + +static inline int vnc_wait_start(int display) +{ + int errcode; + + /* Check if there has been a session allocated yet. This is one of the + * first things that the VNC server will do with the kernel thread is + * started. But we might be here before the thread has gotten that far. + * + * If it has been allocated, then wait until it is in the INIITIALIZED + * state. The INITIAILIZED states indicates tht the session structure + * has been allocated and fully initialized. + */ + + while (g_vnc_sessions[display] == NULL || + g_vnc_sessions[display]->state != VNCSERVER_UNINITIALIZED) + { + /* The server is not yet running. Wait for the server to post the FB + * semaphore. In certain error situations, the server may post the + * semaphore, then reset it to zero. There are are certainly race + * conditions here, but I think none that are fatal. + */ + + while (sem_wait(&g_fbstartup[display].fbinit) < 0) + { + errcode = get_errno(); + + /* sem_wait() should fail only if it is interrupt by a signal. */ + + DEBUGASSERT(errcode == EINTR); + if (errcode != EINTR) + { + DEBUGASSERT(errcode > 0); + return -errcode; + } + } + } + + return OK; +} + +/**************************************************************************** + * Name: vnc_wait_connect * * Description: * Wait for the server to be connected to the VNC client. We can do @@ -397,7 +532,7 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, * ****************************************************************************/ -static inline int vnc_wait_server(int display) +static inline int vnc_wait_connect(int display) { int errcode; int result; @@ -423,7 +558,7 @@ static inline int vnc_wait_server(int display) * conditions here, but I think none that are fatal. */ - while (sem_wait(&g_fbstartup[display].fbsem) < 0) + while (sem_wait(&g_fbstartup[display].fbconnect) < 0) { errcode = get_errno(); @@ -486,48 +621,119 @@ static inline int vnc_wait_server(int display) int up_fbinitialize(int display) { - FAR char *argv[2]; - char str[8]; - pid_t pid; + int ret; - /* Start the VNC server kernel thread. - * REVISIT: There is no protection for the case where this function is - * called more that once. - */ - - gvdbg("Starting the VNC server for display %d\n", display); DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); - /* Check if the server is already running */ + /* Start the VNC server kernel thread. */ - g_fbstartup[display].result = -EBUSY; - sem_reset(&g_fbstartup[display].fbsem, 0); - - if (g_vnc_sessions[display] != NULL) + ret = vnc_start_server(display); + if (ret < 0) { - DEBUGASSERT(g_vnc_sessions[display]->state >= VNCSERVER_INITIALIZED); - } - else - { - /* Format the kernel thread arguments (ASCII.. yech) */ - - (void)itoa(display, str, 10); - argv[0] = str; - argv[1] = NULL; - - pid = kernel_thread("vnc_server", CONFIG_VNCSERVER_PRIO, - CONFIG_VNCSERVER_STACKSIZE, - (main_t)vnc_server, argv); - if (pid < 0) - { - gdbg("ERROR: Failed to start the VNC server: %d\n", (int)pid); - return (int)pid; - } + gvdbg("ERROR: vnc_start_server() failed: %d\n", ret); + return ret; } /* Wait for the VNC client to connect and for the RFB to be ready */ - return vnc_wait_server(display); + ret = vnc_wait_connect(display); + if (ret < 0) + { + gvdbg("ERROR: vnc_wait_connect() failed: %d\n", ret); + } + + return ret; +} + +/**************************************************************************** + * Function: vnc_fbinitialize + * + * Description: + * Initialize the VNC frame buffer driver. The VNC frame buffer driver + * supports two initialization interfaces: The standard up_fbinitialize() + * that will be called from the graphics layer and this speical + * initialization function that can be used only by VNC aware OS logic. + * + * The two initialization functions may be called separated or together in + * either order. The difference is that standard up_fbinitialize(), if + * used by itself, will not have any remote mouse or keyboard inputs that + * are reported to the VNC framebuffer driver from the remote VNC client. + * + * In the standard graphics architecture, the keyboard/mouse inputs are + * received by some appliation/board specific logic at the highest level + * in the architecture via input drivers. The received keyboard/mouse + * input data must then be "injected" into NX where it can they can be + * assigned to the window that has focus. They will eventually be + * received by the Window instances via NX callback methods. + * + * NX is a middleware layer in the architecture, below the + * application/board specific logic but above the driver level logic. The + * frame buffer driver, on the other hand lies at the very lowest level in + * the graphics architecture. It cannot call upward into the application + * nor can it call upward into NX. So, some other logic. + * + * vnc_fbinitialize() provides an optional, alternative initialization + * function. It is optional becuase it need not be called. If it is not + * called, however, keyboard/mouse inputs from the remote VNC client will + * be lost. By calling vnc_fbinitialize(), you can provide callout + * functions that can be received by logic higher in the architure. This + * higher level level callouts can then call nx_kbdin() or nx_mousein() on + * behalf of the VNC server. + * + * Parameters: + * display - In the case of hardware with multiple displays, this + * specifies the display. Normally this is zero. + * kbdout - If non-NULL, then the pointed-to function will be called to + * handle all keyboard input as it is received. This may be either raw, + * ASCII keypress input or encoded keyboard input as determined by + * CONFIG_VNCSERVER_KBDENCODE. See include/nuttx/input/kbd_codec.h. + * mouseout - If non-NULL, then the pointed-to function will be called to + * handle all mouse input as it is received. + * arg - An opaque user provided argument that will be provided when the + * callouts are performed. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +int vnc_fbinitialize(int display, vnc_kbdout_t kbdout, + vnc_mouseout_t mouseout, FAR void *arg) +{ + FAR struct vnc_session_s *session; + int ret; + + DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); + + /* Start the VNC server kernel thread. */ + + ret = vnc_start_server(display); + if (ret < 0) + { + gvdbg("ERROR: vnc_start_server() failed: %d\n", ret); + return ret; + } + + /* Wait for the VNC server to start and complete initialization. */ + + ret = vnc_wait_start(display); + if (ret < 0) + { + gvdbg("ERROR: vnc_wait_start() failed: %d\n", ret); + return ret; + } + + /* Save the input callout function information in the session structure. */ + + session = g_vnc_sessions[display]; + DEBUGASSERT(session != NULL); + + session->kbdout = kbdout; + session->mouseout = mouseout; + session->arg = arg; + + return OK; } /**************************************************************************** @@ -550,12 +756,15 @@ int up_fbinitialize(int display) FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) { - FAR struct vnc_session_s *session = vnc_find_session(display); + FAR struct vnc_session_s *session; FAR struct vnc_fbinfo_s *fbinfo; + DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[display]; + /* Verify that the session is still valid */ - if (session->state != VNCSERVER_RUNNING) + if (session == NULL || session->state != VNCSERVER_RUNNING) { return NULL; } @@ -607,14 +816,21 @@ FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) void up_fbuninitialize(int display) { #if 0 /* Do nothing */ - FAR struct vnc_session_s *session = vnc_find_session(display); + FAR struct vnc_session_s *session; FAR struct vnc_fbinfo_s *fbinfo; - DEBUGASSERT(session != NULL); - fbinfo = &g_fbinfo[display]; + DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); + session = g_vnc_sessions[display]; + + /* Verify that the session is still valid */ + + if (session != NULL) + { + fbinfo = &g_fbinfo[display]; #warning Missing logic - UNUSED(session); - UNUSED(fbinfo); + UNUSED(session); + UNUSED(fbinfo); + } #endif } @@ -653,7 +869,7 @@ void nx_notify_rectangle(FAR NX_PLANEINFOTYPE *pinfo, */ DEBUGASSERT(pinfo->display >= 0 && pinfo->display < RFB_MAX_DISPLAYS); - session = vnc_find_session(pinfo->display); + session = g_vnc_sessions[pinfo->display]; /* Verify that the session is still valid */ @@ -661,7 +877,7 @@ void nx_notify_rectangle(FAR NX_PLANEINFOTYPE *pinfo, { /* Queue the rectangular update */ - ret = vnc_update_rectangle(session, rect); + ret = vnc_update_rectangle(session, rect, true); if (ret < 0) { gdbg("ERROR: vnc_update_rectangle failed: %d\n", ret); diff --git a/graphics/vnc/server/vnc_keymap.c b/graphics/vnc/server/vnc_keymap.c index 57690183f46..b23e3199a1f 100644 --- a/graphics/vnc/server/vnc_keymap.c +++ b/graphics/vnc/server/vnc_keymap.c @@ -48,6 +48,8 @@ #define XK_LATIN1 1 #define XK_XKB_KEYS 1 +#include +#include #include #include @@ -481,9 +483,10 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym, #ifdef CONFIG_VNCSERVER_KBDENCODE uint8_t buffer[4] int nch; +#else + uint8_t buffer; #endif int16_t keych; - int ret; /* Check for modifier keys */ @@ -505,6 +508,14 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym, } #endif + /* If no external keyboard input handler has been provided, then we have to drop the keyboard input. + */ + + if (session->kbdout == NULL) + { + return; + } + /* Try to convert the keycode to an ASCII value */ keych = vnc_kbd_ascii((char)(keysym & 255)); @@ -580,19 +591,12 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym, /* Inject the normal character sequence into NX */ - ret = nx_kbdin(session->handle, nch, buffer); - if (ret < 0) - { - gdbg("ERROR: nx_kbdin() failed: %d\n", ret); - } + session->kbdout(session->arg, nch, buffer); #else /* Inject the single key press into NX */ - ret = nx_kbdchin(session->handle,(uint8_t)keych); - if (ret < 0) - { - gdbg("ERROR: nx_kbdchin() failed: %d\n", ret); - } + buffer = (uint8_t)keych; + session->kbdout(session->arg, 1, &buffer); #endif } @@ -619,14 +623,32 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym, /* Inject the special character sequence into NX */ - ret = nx_kbdin(session->handle, nch, buffer); - if (ret < 0) - { - gdbg("ERROR: nx_kbdin() failed: %d\n", ret) - } + session->kbdout(session->arg, nch, buffer); } } #endif } +/**************************************************************************** + * Function: vnc_kbdout + * + * Description: + * This is the default keyboard callout function. This is simply wrappers around nx_kdbout(), respectively. When configured using vnc_fbinitialize(), the 'arg' must be the correct NXHANDLE value. + * + * Parameters: + * arg - The NXHANDLE from the NX graphics subsystem + * nch - Number of characters + * ch - An array of input characters. + * + * Returned Value: + * None + * + ****************************************************************************/ + +void vnc_kbdout(FAR void *arg, uint8_t nch, FAR const uint8_t *ch) +{ + DEBUGASSERT(arg != NULL); + (void)nx_kbdin((NXHANDLE)arg, nch, ch); +} + #endif /* CONFIG_NX_KBD */ \ No newline at end of file diff --git a/graphics/vnc/server/vnc_negotiate.c b/graphics/vnc/server/vnc_negotiate.c index bf3671bd1d0..1d7e28d8148 100644 --- a/graphics/vnc/server/vnc_negotiate.c +++ b/graphics/vnc/server/vnc_negotiate.c @@ -43,6 +43,14 @@ #include #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #ifdef CONFIG_NET_SOCKOPTS @@ -154,6 +162,11 @@ int vnc_negotiate(FAR struct vnc_session_s *session) DEBUGASSERT(errcode > 0); return -errcode; } + else if (nrecvd == 0) + { + gdbg("Connection closed\n"); + return -ECONNABORTED; + } DEBUGASSERT(nrecvd == len); @@ -221,6 +234,11 @@ int vnc_negotiate(FAR struct vnc_session_s *session) DEBUGASSERT(errcode > 0); return -errcode; } + else if (nrecvd == 0) + { + gdbg("Connection closed\n"); + return -ECONNABORTED; + } DEBUGASSERT(nrecvd == sizeof(struct rfb_selected_sectype_s)); @@ -305,6 +323,11 @@ int vnc_negotiate(FAR struct vnc_session_s *session) DEBUGASSERT(errcode > 0); return -errcode; } + else if (nrecvd == 0) + { + gdbg("Connection closed\n"); + return -ECONNABORTED; + } DEBUGASSERT(nrecvd == sizeof(struct rfb_clientinit_s)); @@ -375,6 +398,11 @@ int vnc_negotiate(FAR struct vnc_session_s *session) DEBUGASSERT(errcode > 0); return -errcode; } + else if (nrecvd == 0) + { + gdbg("Connection closed\n"); + return -ECONNABORTED; + } else if (nrecvd != sizeof(struct rfb_setpixelformat_s)) { /* Must not be a SetPixelFormat message? */ @@ -384,12 +412,13 @@ int vnc_negotiate(FAR struct vnc_session_s *session) } else if (setformat->msgtype != RFB_SETPIXELFMT_MSG) { - gdbg("ERROR: Not a SetPixelFormat message: %d\n", (int)setformat->msgtype); + gdbg("ERROR: Not a SetPixelFormat message: %d\n", + (int)setformat->msgtype); return -EPROTO; } - /* Instantiate the client pixel format, verifying that the client request format - * is one that we can handle. + /* Instantiate the client pixel format, verifying that the client request + * format is one that we can handle. */ ret = vnc_client_pixelformat(session, &setformat->format); @@ -408,7 +437,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) encodings = (FAR struct rfb_setencodings_s *)session->inbuf; nrecvd = psock_recv(&session->connect, encodings, - CONFIG_VNCSERVER_INBUFFER_SIZE, 0); + CONFIG_VNCSERVER_INBUFFER_SIZE, 0); if (nrecvd < 0) { errcode = get_errno(); @@ -416,10 +445,15 @@ int vnc_negotiate(FAR struct vnc_session_s *session) DEBUGASSERT(errcode > 0); return -errcode; } - - if (nrecvd > 0 && encodings->msgtype == RFB_SETENCODINGS_MSG) + else if (nrecvd == 0) { - DEBUGASSERT(nrecvd >= SIZEOF_RFB_SETENCODINGS_S(0)); + gdbg("Connection closed\n"); + return -ECONNABORTED; + } + + if (encodings->msgtype == RFB_SETENCODINGS_MSG) + { + DEBUGASSERT(nrecvd >= SIZEOF_RFB_SETENCODINGS_S(0)); /* Pick out any mutually supported encodings */ @@ -465,37 +499,43 @@ int vnc_client_pixelformat(FAR struct vnc_session_s *session, if (pixelfmt->bpp == 8 && pixelfmt->depth == 6) { gvdbg("Client pixel format: RGB8 2:2:2\n"); - session->colorfmt = FB_FMT_RGB8_222; - session->bpp = 8; + session->colorfmt = FB_FMT_RGB8_222; + session->bpp = 8; + session->bigendian = false; } else if (pixelfmt->bpp == 8 && pixelfmt->depth == 8) { gvdbg("Client pixel format: RGB8 3:3:2\n"); - session->colorfmt = FB_FMT_RGB8_332; - session->bpp = 8; + session->colorfmt = FB_FMT_RGB8_332; + session->bpp = 8; + session->bigendian = false; } else if (pixelfmt->bpp == 16 && pixelfmt->depth == 15) { gvdbg("Client pixel format: RGB16 5:5:5\n"); - session->colorfmt = FB_FMT_RGB16_555; - session->bpp = 16; + session->colorfmt = FB_FMT_RGB16_555; + session->bpp = 16; + session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else if (pixelfmt->bpp == 16 && pixelfmt->depth == 16) { gvdbg("Client pixel format: RGB16 5:6:5\n"); - session->colorfmt = FB_FMT_RGB16_565; - session->bpp = 16; + session->colorfmt = FB_FMT_RGB16_565; + session->bpp = 16; + session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else if (pixelfmt->bpp == 32 && pixelfmt->depth == 24) { gvdbg("Client pixel format: RGB32 8:8:8\n"); - session->colorfmt = FB_FMT_RGB32; - session->bpp = 32; + session->colorfmt = FB_FMT_RGB32; + session->bpp = 32; + session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else if (pixelfmt->bpp == 32 && pixelfmt->depth == 32) { - session->colorfmt = FB_FMT_RGB32; - session->bpp = 32; + session->colorfmt = FB_FMT_RGB32; + session->bpp = 32; + session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else { @@ -506,5 +546,6 @@ int vnc_client_pixelformat(FAR struct vnc_session_s *session, return -ENOSYS; } + session->change = true; return OK; } diff --git a/graphics/vnc/server/vnc_raw.c b/graphics/vnc/server/vnc_raw.c index 7d49a013f03..947cbfe9055 100644 --- a/graphics/vnc/server/vnc_raw.c +++ b/graphics/vnc/server/vnc_raw.c @@ -42,6 +42,14 @@ #include #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #include "vnc_server.h" @@ -135,14 +143,16 @@ static size_t vnc_copy16(FAR struct vnc_session_s *session, FAR struct rfb_framebufferupdate_s *update; FAR const lfb_color_t *srcleft; FAR const lfb_color_t *src; - FAR uint16_t *dest; + FAR uint8_t *dest; + uint16_t pixel; nxgl_coord_t x; nxgl_coord_t y; + bool bigendian; /* Destination rectangle start address */ update = (FAR struct rfb_framebufferupdate_s *)session->outbuf; - dest = (FAR uint16_t *)update->rect[0].data; + dest = (FAR uint8_t *)update->rect[0].data; /* Source rectangle start address (left/top)*/ @@ -150,12 +160,24 @@ static size_t vnc_copy16(FAR struct vnc_session_s *session, /* Transfer each row from the source buffer into the update buffer */ + bigendian = session->bigendian; for (y = 0; y < height; y++) { src = srcleft; for (x = 0; x < width; x++) { - *dest++ = convert(*src); + pixel = convert(*src); + + if (bigendian) + { + rfb_putbe16(dest, pixel); + } + else + { + rfb_putle16(dest, pixel); + } + + dest += sizeof(uint16_t); src++; } @@ -192,14 +214,16 @@ static size_t vnc_copy32(FAR struct vnc_session_s *session, FAR struct rfb_framebufferupdate_s *update; FAR const lfb_color_t *srcleft; FAR const lfb_color_t *src; - FAR uint32_t *dest; + FAR uint8_t *dest; nxgl_coord_t x; nxgl_coord_t y; + uint32_t pixel; + bool bigendian; /* Destination rectangle start address */ update = (FAR struct rfb_framebufferupdate_s *)session->outbuf; - dest = (FAR uint32_t *)update->rect[0].data; + dest = (FAR uint8_t *)update->rect[0].data; /* Source rectangle start address (left/top)*/ @@ -207,12 +231,24 @@ static size_t vnc_copy32(FAR struct vnc_session_s *session, /* Transfer each row from the source buffer into the update buffer */ + bigendian = session->bigendian; for (y = 0; y < height; y++) { src = srcleft; for (x = 0; x < width; x++) { - *dest++ = convert(*src); + pixel = convert(*src); + + if (bigendian) + { + rfb_putbe32(dest, pixel); + } + else + { + rfb_putle32(dest, pixel); + } + + dest += sizeof(uint32_t); src++; } @@ -454,6 +490,9 @@ int vnc_raw(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) size -= nsent; } while (size > 0); + + updvdbg("Sent {(%d, %d),(%d, %d)}\n", + x, y, x + updwidth -1, y + updheight - 1); } } } diff --git a/graphics/vnc/server/vnc_receiver.c b/graphics/vnc/server/vnc_receiver.c index 1df8df72d27..4f25d4931eb 100644 --- a/graphics/vnc/server/vnc_receiver.c +++ b/graphics/vnc/server/vnc_receiver.c @@ -41,6 +41,14 @@ #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #ifdef CONFIG_NET_SOCKOPTS @@ -49,6 +57,9 @@ #include #include +#include +#include +#include #include "vnc_server.h" @@ -165,6 +176,16 @@ int vnc_receiver(FAR struct vnc_session_s *session) return -errcode; } + /* A return value of zero means that the connection was gracefully + * closed by the VNC client. + */ + + else if (nrecvd == 0) + { + gdbg("Connection closed\n", errcode); + return OK; + } + DEBUGASSERT(nrecvd == 1); /* The single byte received should be the message type. Handle the @@ -207,7 +228,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) case RFB_SETENCODINGS_MSG: /* SetEncodings */ { FAR struct rfb_setencodings_s *encodings; - uint32_t nencodings; + unsigned int nencodings; gvdbg("Received SetEncodings\n"); @@ -228,7 +249,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) /* Read the following encodings */ encodings = (FAR struct rfb_setencodings_s *)session->inbuf; - nencodings = rfb_getbe32(encodings->nencodings); + nencodings = rfb_getbe16(encodings->nencodings); ret = vnc_read_remainder(session, nencodings * sizeof(uint32_t), @@ -280,7 +301,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) rect.pt2.x = rect.pt1.x + rfb_getbe16(update->width); rect.pt2.y = rect.pt1.y + rfb_getbe16(update->height); - ret = vnc_update_rectangle(session, &rect); + ret = vnc_update_rectangle(session, &rect, false); if (ret < 0) { gdbg("ERROR: Failed to queue update: %d\n", ret); @@ -337,7 +358,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) #ifdef CONFIG_NX_XYINPUT /* REVISIT: How will be get the NX handle? */ - else if (session->handle != NULL) + else if (session->mouseout != NULL) { event = (FAR struct rfb_pointerevent_s *)session->inbuf; @@ -362,14 +383,10 @@ int vnc_receiver(FAR struct vnc_session_s *session) buttons |= NX_MOUSE_RIGHTBUTTON; } - ret = nx_mousein(session->handle, - (nxgl_coord_t)rfb_getbe16(event->xpos), - (nxgl_coord_t)rfb_getbe16(event->ypos), - buttons); - if (ret < 0) - { - gdbg("ERROR: nx_mousein failed: %d\n", ret); - } + session->mouseout(session->arg, + (nxgl_coord_t)rfb_getbe16(event->xpos), + (nxgl_coord_t)rfb_getbe16(event->ypos), + buttons); } #endif } @@ -456,7 +473,7 @@ int vnc_client_encodings(FAR struct vnc_session_s *session, /* Loop for each client supported encoding */ - nencodings = rfb_getbe32(encodings->nencodings); + nencodings = rfb_getbe16(encodings->nencodings); for (i = 0; i < nencodings; i++) { /* Get the next encoding */ @@ -468,9 +485,37 @@ int vnc_client_encodings(FAR struct vnc_session_s *session, if (encoding == RFB_ENCODING_RRE) { session->rre = true; - return OK; } } + session->change = true; return OK; } + +/**************************************************************************** + * Function: vnc_mouse + * + * Description: + * This is the default keyboard/mouse callout function. This is simply a + * wrapper around nx_mousein(). When + * configured using vnc_fbinitialize(), the 'arg' must be the correct + * NXHANDLE value. + * + * Parameters: + * See vnc_mouseout_t and vnc_kbdout_t typde definitions above. These + * callouts have arguments that match the inputs to nx_kbdin() and + * nx_mousein() (if arg is really of type NXHANDLE). + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_NX_XYINPUT +void vnc_mouseout(FAR void *arg, nxgl_coord_t x, nxgl_coord_t y, + uint8_t buttons) +{ + DEBUGASSERT(arg != NULL); + (void)nx_mousein((NXHANDLE)arg, x, y, buttons); +} +#endif diff --git a/graphics/vnc/server/vnc_rre.c b/graphics/vnc/server/vnc_rre.c index a271efa9d69..a216a495249 100644 --- a/graphics/vnc/server/vnc_rre.c +++ b/graphics/vnc/server/vnc_rre.c @@ -42,6 +42,14 @@ #include #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #include "vnc_server.h" @@ -50,35 +58,119 @@ * Private Types ****************************************************************************/ -struct rre_data_s +struct rre_encode8_s { -#if RFB_BITSPERPIXEL == 16 - struct rfb_rrehdr16_s hdr; /* Header with background pixel */ - struct rfb_rrerect16_s srect; /* Sub-rectangle */ -#elif RFB_BITSPERPIXEL == 32 - struct rfb_rrehdr32_s hdr; /* Header with background pixel */ - struct rfb_rrerect32_s srect; /* Sub-rectangle */ -#endif + struct rfb_rrehdr8_s hdr; + struct rfb_rrerect8_s rect; }; -struct rre_rectangle_s +struct rre_encode16_s { - uint8_t xpos[2]; /* U16 X position */ - uint8_t ypos[2]; /* U16 Y position */ - uint8_t width[2]; /* U16 Width */ - uint8_t height[2]; /* U16 Height */ - uint8_t encoding[4]; /* S32 Encoding type = RFB_ENCODING_RRE */ - struct rre_data_s data; /* Pixel data, actual size varies */ + struct rfb_rrehdr16_s hdr; + struct rfb_rrerect16_s rect; }; -struct rre_framebufferupdate_s +struct rre_encode32_s { - uint8_t msgtype; /* U8 Message type = RFB_FBUPDATE_MSG*/ - uint8_t padding; - uint8_t nrect[2]; /* U16 Number of rectangles = 1*/ - struct rre_rectangle_s rect; /* RRE encoded rectangle */ + struct rfb_rrehdr32_s hdr; + struct rfb_rrerect32_s rect; }; +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: vnc_rreNN + * + * Description: + * Encode a single RRE sub-rectangle, NN=bits-per-pixel + * + * Input Parameters: + * session - An instance of the session structure. + * dest - The locate to save the RRE encoded data + * rect - Describes the rectangle in the local framebuffer. + * bgcolor - The local color of the pixel data + * + * Returned Value: + * The size of the framebuffer update message is returned.. + * + ****************************************************************************/ + +ssize_t vnc_rre8(FAR struct vnc_session_s *session, + FAR struct rre_encode8_s *dest, + FAR struct nxgl_rect_s *rect, + uint8_t bgcolor) +{ + nxgl_coord_t width; + nxgl_coord_t height; + + rfb_putbe32(dest->hdr.nsubrects, 1); + dest->hdr.pixel = bgcolor; + + dest->rect.pixel = bgcolor; + rfb_putbe16(dest->rect.xpos, rect->pt1.x); + rfb_putbe16(dest->rect.ypos, rect->pt1.y); + + width = rect->pt2.x - rect->pt1.x + 1; + height = rect->pt2.y - rect->pt1.y + 1; + + rfb_putbe16(dest->rect.width, width); + rfb_putbe16(dest->rect.height, height); + + return sizeof(struct rre_encode8_s); +} + +ssize_t vnc_rre16(FAR struct vnc_session_s *session, + FAR struct rre_encode16_s *dest, + FAR struct nxgl_rect_s *rect, + uint16_t bgcolor) +{ + nxgl_coord_t width; + nxgl_coord_t height; + + rfb_putbe32(dest->hdr.nsubrects, 1); + rfb_putbe16(dest->hdr.pixel, bgcolor); + + rfb_putbe16(dest->rect.pixel, bgcolor); + rfb_putbe16(dest->rect.xpos, rect->pt1.x); + rfb_putbe16(dest->rect.xpos, rect->pt1.x); + rfb_putbe16(dest->rect.ypos, rect->pt1.y); + + width = rect->pt2.x - rect->pt1.x + 1; + height = rect->pt2.y - rect->pt1.y + 1; + + rfb_putbe16(dest->rect.width, width); + rfb_putbe16(dest->rect.height, height); + + return sizeof(struct rre_encode16_s); +} + +ssize_t vnc_rre32(FAR struct vnc_session_s *session, + FAR struct rre_encode32_s *dest, + FAR struct nxgl_rect_s *rect, + uint32_t bgcolor) +{ + nxgl_coord_t width; + nxgl_coord_t height; + + rfb_putbe32(dest->hdr.nsubrects, 1); + rfb_putbe32(dest->hdr.pixel, bgcolor); + + rfb_putbe32(dest->rect.pixel, bgcolor); + rfb_putbe16(dest->rect.xpos, rect->pt1.x); + rfb_putbe16(dest->rect.xpos, rect->pt1.x); + rfb_putbe16(dest->rect.ypos, rect->pt1.y); + + width = rect->pt2.x - rect->pt1.x + 1; + height = rect->pt2.y - rect->pt1.y + 1; + + rfb_putbe16(dest->rect.width, width); + rfb_putbe16(dest->rect.height, height); + + return sizeof(struct rre_encode32_s); +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -97,22 +189,21 @@ struct rre_framebufferupdate_s * * Returned Value: * Zero is returned if RRE coding was not performed (but not error was) - * encountered. Otherwise, eith the size of the framebuffer update - * message is returned on success or a negated errno value is returned on - * failure that indicates the the nature of the failure. A failure is - * only returned in cases of a network failure and unexpected internal - * failures. + * encountered. Otherwise, the size of the framebuffer update message + * is returned on success or a negated errno value is returned on failure + * that indicates the the nature of the failure. A failure is only + * returned in cases of a network failure and unexpected internal failures. * ****************************************************************************/ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) { - FAR struct rre_framebufferupdate_s *rre; - FAR struct rre_rectangle_s *rrect; - FAR struct rre_data_s *rdata; + FAR struct rfb_framebufferupdate_s *rre; + FAR struct rfb_rectangle_s *rrect; lfb_color_t bgcolor; nxgl_coord_t width; nxgl_coord_t height; + size_t nbytes; ssize_t nsent; int ret; @@ -125,38 +216,66 @@ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) ret = vnc_colors(session, rect, 1, &bgcolor); if (ret == 1) { - width = rect->pt2.x - rect->pt1.x + 1; - height = rect->pt2.y - rect->pt1.y + 1; + width = rect->pt2.x - rect->pt1.x + 1; + height = rect->pt2.y - rect->pt1.y + 1; /* Format the FrameBuffer Update with a single RRE encoded * rectangle. */ - rre = (FAR struct rre_framebufferupdate_s *)session->outbuf; + rre = (FAR struct rfb_framebufferupdate_s *)session->outbuf; rre->msgtype = RFB_FBUPDATE_MSG; rre->padding = 0; rfb_putbe16(rre->nrect, 1); - rrect = (FAR struct rre_rectangle_s *)&rre->rect; + rrect = (FAR struct rfb_rectangle_s *)&rre->rect; rfb_putbe16(rrect->xpos, rect->pt1.x); rfb_putbe16(rrect->ypos, rect->pt1.y); rfb_putbe16(rrect->width, width); rfb_putbe16(rrect->height, height); rfb_putbe32(rrect->encoding, RFB_ENCODING_RRE); - rdata = (FAR struct rre_data_s *)&rrect->data; - rfb_putbe32(rdata->hdr.nsubrects, 1); -#if RFB_BITSPERPIXEL == 16 - rfb_putbe16(rdata->hdr.pixel, bgcolor); - rfb_putbe16(rdata->srect.pixel, bgcolor); -#elif RFB_BITSPERPIXEL == 32 - rfb_putbe32(rdata->hdr.pixel, bgcolor); - rfb_putbe32(rdata->srect.pixel, bgcolor); -#endif - rfb_putbe16(rdata->srect.xpos, rect->pt1.x); - rfb_putbe16(rdata->srect.ypos, rect->pt1.y); - rfb_putbe16(rdata->srect.width, width); - rfb_putbe16(rdata->srect.height, height); + /* The sub-rectangle encoding depends of the remote pixel width */ + + nbytes = SIZEOF_RFB_FRAMEBUFFERUPDATE_S(SIZEOF_RFB_RECTANGE_S(0)); + + switch (session->colorfmt) + { + case FB_FMT_RGB8_222: + nbytes += vnc_rre8(session, + (FAR struct rre_encode8_s *)rrect->data, + rect, vnc_convert_rgb8_222(bgcolor)); + break; + + case FB_FMT_RGB8_332: + nbytes += vnc_rre8(session, + (FAR struct rre_encode8_s *)rrect->data, + rect, vnc_convert_rgb8_332(bgcolor)); + break; + + case FB_FMT_RGB16_555: + nbytes += vnc_rre16(session, + (FAR struct rre_encode16_s *)rrect->data, + rect, vnc_convert_rgb16_555(bgcolor)); + break; + + case FB_FMT_RGB16_565: + nbytes += vnc_rre16(session, + (FAR struct rre_encode16_s *)rrect->data, + rect, vnc_convert_rgb16_565(bgcolor)); + break; + + case FB_FMT_RGB32: + nbytes += vnc_rre32(session, + (FAR struct rre_encode32_s *)rrect->data, + rect, vnc_convert_rgb32_888(bgcolor)); + break; + + default: + gdbg("ERROR: Unrecognized color format: %d\n", + session->colorfmt); + return -EINVAL; + } /* At the very last most, make certain that the supported encoding * has not changed asynchronously. @@ -169,8 +288,7 @@ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) * and there are a limited number of IOBs available. */ - nsent = psock_send(&session->connect, rre, - sizeof(struct rre_framebufferupdate_s), 0); + nsent = psock_send(&session->connect, rre, nbytes, 0); if (nsent < 0) { int errcode = get_errno(); @@ -180,8 +298,10 @@ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) return -errcode; } - DEBUGASSERT(nsent == sizeof(struct rre_framebufferupdate_s)); - return sizeof(struct rre_framebufferupdate_s); + DEBUGASSERT(nsent == nbytes); + updvdbg("Sent {(%d, %d),(%d, %d)}\n", + rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y); + return nbytes; } return -EINVAL; diff --git a/graphics/vnc/server/vnc_server.c b/graphics/vnc/server/vnc_server.c index 742a97fa014..db49b55c618 100644 --- a/graphics/vnc/server/vnc_server.c +++ b/graphics/vnc/server/vnc_server.c @@ -46,6 +46,14 @@ #include #include #include + +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif #include #include @@ -121,9 +129,11 @@ static void vnc_reset_session(FAR struct vnc_session_s *session, sem_reset(&session->freesem, CONFIG_VNCSERVER_NUPDATES); sem_reset(&session->queuesem, 0); + session->fb = fb; session->display = display; session->state = VNCSERVER_INITIALIZED; + session->change = true; } /**************************************************************************** @@ -271,6 +281,11 @@ int vnc_server(int argc, FAR char *argv[]) sem_init(&session->freesem, 0, CONFIG_VNCSERVER_NUPDATES); sem_init(&session->queuesem, 0, 0); + /* Inform any waiter that we have started */ + + vnc_reset_session(session, fb, display); + sem_post(&g_fbstartup[display].fbinit); + /* Loop... handling each each VNC client connection to this display. Only * a single client is allowed for each display. */ @@ -283,7 +298,7 @@ int vnc_server(int argc, FAR char *argv[]) vnc_reset_session(session, fb, display); g_fbstartup[display].result = -EBUSY; - sem_reset(&g_fbstartup[display].fbsem, 0); + sem_reset(&g_fbstartup[display].fbconnect, 0); /* Establish a connection with the VNC client */ @@ -321,7 +336,7 @@ int vnc_server(int argc, FAR char *argv[]) */ g_fbstartup[display].result = OK; - sem_post(&g_fbstartup[display].fbsem); + sem_post(&g_fbstartup[display].fbconnect); /* Run the VNC receiver on this trhead. The VNC receiver handles * all Client-to-Server messages. The VNC receiver function does @@ -331,6 +346,7 @@ int vnc_server(int argc, FAR char *argv[]) ret = vnc_receiver(session); gvdbg("Session terminated with %d\n", ret); + UNUSED(ret); /* Stop the VNC updater thread. */ @@ -347,36 +363,6 @@ errout_with_fb: errout_with_post: g_fbstartup[display].result = ret; - sem_post(&g_fbstartup[display].fbsem); + sem_post(&g_fbstartup[display].fbconnect); return EXIT_FAILURE; } - -/**************************************************************************** - * Name: vnc_find_session - * - * Description: - * Return the session structure associated with this display. - * - * Input Parameters: - * display - The display number of interest. - * - * Returned Value: - * Returns the instance of the session structure for this display. NULL - * will be returned if the server has not yet been started or if the - * display number is out of range. - * - ****************************************************************************/ - -FAR struct vnc_session_s *vnc_find_session(int display) -{ - FAR struct vnc_session_s *session = NULL; - - DEBUGASSERT(display >= 0 && display < RFB_MAX_DISPLAYS); - - if (display >= 0 && display < RFB_MAX_DISPLAYS) - { - session = g_vnc_sessions[display]; - } - - return session; -} diff --git a/graphics/vnc/server/vnc_server.h b/graphics/vnc/server/vnc_server.h index 9b7b0596152..45d34b52600 100644 --- a/graphics/vnc/server/vnc_server.h +++ b/graphics/vnc/server/vnc_server.h @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -181,6 +182,34 @@ # define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif +/* Debug */ + +#ifdef CONFIG_VNCSERVER_UPDATE_DEBUG +# ifdef CONFIG_CPP_HAVE_VARARGS +# define upddbg(format, ...) dbg(format, ##__VA_ARGS__) +# define updlldbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define updvdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define updllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +# else +# define upddbg dbg +# define updlldbg lldbg +# define updvdbg vdbg +# define updllvdbg llvdbg +# endif +#else +# ifdef CONFIG_CPP_HAVE_VARARGS +# define upddbg(x...) +# define updlldbg(x...) +# define updvdbg(x...) +# define updllvdbg(x...) +# else +# define upddbg (void) +# define updlldbg (void) +# define updvdbg (void) +# define updllvdbg (void) +# endif +#endif + /**************************************************************************** * Public Types ****************************************************************************/ @@ -205,29 +234,35 @@ enum vnc_server_e struct vnc_fbupdate_s { FAR struct vnc_fbupdate_s *flink; + bool whupd; /* True: whole screen update */ struct nxgl_rect_s rect; /* The enqueued update rectangle */ }; struct vnc_session_s { - /* NX graphics system */ - - NXHANDLE handle; /* NX graphics handle */ - /* Connection data */ struct socket listen; /* Listen socket */ struct socket connect; /* Connected socket */ volatile uint8_t state; /* See enum vnc_server_e */ + volatile uint8_t nwhupd; /* Number of whole screen updates queued */ + volatile bool change; /* True: Frambebuffer data change since last whole screen update */ /* Display geometry and color characteristics */ uint8_t display; /* Display number (for debug) */ volatile uint8_t colorfmt; /* Remote color format (See include/nuttx/fb.h) */ volatile uint8_t bpp; /* Remote bits per pixel */ - volatile bool rre; /* Remote supports RRE encoding */ + volatile bool bigendian; /* True: Remote expect data in big-endian format */ + volatile bool rre; /* True: Remote supports RRE encoding */ FAR uint8_t *fb; /* Allocated local frame buffer */ + /* VNC client input support */ + + vnc_kbdout_t kbdout; /* Callout when keyboard input is received */ + vnc_mouseout_t mouseout; /* Callout when keyboard input is received */ + FAR void *arg; /* Argument that accompanies the callouts */ + /* Updater information */ pthread_t updater; /* Updater thread ID */ @@ -252,7 +287,8 @@ struct vnc_session_s struct fb_startup_s { - sem_t fbsem; /* Framebuffer driver will wait on this */ + sem_t fbinit; /* Wait for session creation */ + sem_t fbconnect; /* Wait for client connection */ int16_t result; /* OK: successfully initialized */ }; @@ -415,6 +451,7 @@ int vnc_stop_updater(FAR struct vnc_session_s *session); * Input Parameters: * session - An instance of the session structure. * rect - The rectanglular region to be updated. + * change - True: Frame buffer data has changed * * Returned Value: * Zero (OK) is returned on success; a negated errno value is returned on @@ -423,7 +460,8 @@ int vnc_stop_updater(FAR struct vnc_session_s *session); ****************************************************************************/ int vnc_update_rectangle(FAR struct vnc_session_s *session, - FAR const struct nxgl_rect_s *rect); + FAR const struct nxgl_rect_s *rect, + bool change); /**************************************************************************** * Name: vnc_receiver @@ -455,11 +493,10 @@ int vnc_receiver(FAR struct vnc_session_s *session); * * Returned Value: * Zero is returned if RRE coding was not performed (but not error was) - * encountered. Otherwise, eith the size of the framebuffer update - * message is returned on success or a negated errno value is returned on - * failure that indicates the the nature of the failure. A failure is - * only returned in cases of a network failure and unexpected internal - * failures. + * encountered. Otherwise, the size of the framebuffer update message + * is returned on success or a negated errno value is returned on failure + * that indicates the the nature of the failure. A failure is only + * returned in cases of a network failure and unexpected internal failures. * ****************************************************************************/ @@ -507,24 +544,6 @@ void vnc_key_map(FAR struct vnc_session_s *session, uint16_t keysym, bool keydown); #endif -/**************************************************************************** - * Name: vnc_find_session - * - * Description: - * Return the session structure associated with this display. - * - * Input Parameters: - * display - The display number of interest. - * - * Returned Value: - * Returns the instance of the session structure for this display. NULL - * will be returned if the server has not yet been started or if the - * display number is out of range. - * - ****************************************************************************/ - -FAR struct vnc_session_s *vnc_find_session(int display); - /**************************************************************************** * Name: vnc_convert_rgbNN * diff --git a/graphics/vnc/server/vnc_updater.c b/graphics/vnc/server/vnc_updater.c index a93f6c3b81a..0368e46f424 100644 --- a/graphics/vnc/server/vnc_updater.c +++ b/graphics/vnc/server/vnc_updater.c @@ -47,6 +47,17 @@ #include #include +#if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) +# undef CONFIG_DEBUG +# undef CONFIG_DEBUG_VERBOSE +# define CONFIG_DEBUG 1 +# define CONFIG_DEBUG_VERBOSE 1 +# define CONFIG_DEBUG_GRAPHICS 1 +#endif +#include + +#include + #include "vnc_server.h" /**************************************************************************** @@ -63,6 +74,20 @@ static sem_t g_dbgsem = SEM_INITIALIZER(1); #endif +/* A rectangle represent the entire local framebuffer */ + +static const struct nxgl_rect_s g_wholescreen = +{ + { + 0, + 0 + }, + { + CONFIG_VNCSERVER_SCREENWIDTH - 1, + CONFIG_VNCSERVER_SCREENHEIGHT - 1 + } +}; + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -237,11 +262,18 @@ vnc_remove_queue(FAR struct vnc_session_s *session) /* It is reserved.. go get it */ rect = (FAR struct vnc_fbupdate_s *)sq_remfirst(&session->updqueue); + DEBUGASSERT(rect != NULL); + + /* Check if we just removed the whole screen update from the queue */ + + if (session->nwhupd > 0 && rect->whupd) + { + session->nwhupd--; + updvdbg("Whole screen update: nwhupd=%d\n", session->nwhupd); + } vnc_sem_debug(session, "After remove", 0); sched_unlock(); - - DEBUGASSERT(rect != NULL); return rect; } @@ -325,6 +357,10 @@ static FAR void *vnc_updater(FAR void *arg) srcrect = vnc_remove_queue(session); DEBUGASSERT(srcrect != NULL); + updvdbg("Dequeued {(%d, %d),(%d, %d)}\n", + srcrect->rect.pt1.x, srcrect->rect.pt1.y, + srcrect->rect.pt2.x, srcrect->rect.pt2.y); + /* Attempt to use RRE encoding */ ret = vnc_rre(session, &srcrect->rect); @@ -454,6 +490,7 @@ int vnc_stop_updater(FAR struct vnc_session_s *session) * Input Parameters: * session - An instance of the session structure. * rect - The rectanglular region to be updated. + * change - True: Frame buffer data has changed * * Returned Value: * Zero (OK) is returned on success; a negated errno value is returned on @@ -462,40 +499,103 @@ int vnc_stop_updater(FAR struct vnc_session_s *session) ****************************************************************************/ int vnc_update_rectangle(FAR struct vnc_session_s *session, - FAR const struct nxgl_rect_s *rect) + FAR const struct nxgl_rect_s *rect, bool change) { FAR struct vnc_fbupdate_s *update; + struct nxgl_rect_s intersection; + bool whupd; - /* Make sure that the rectangle has a area */ + /* Clip rectangle to the screen dimensions */ - if (!nxgl_nullrect(rect)) + nxgl_rectintersect(&intersection, rect, &g_wholescreen); + + /* Make sure that the clipped rectangle has a area */ + + if (!nxgl_nullrect(&intersection)) { - /* Allocate an update structure... waiting if necessary */ + /* Check for a whole screen update. The RealVNC client sends a lot + * of these (especially when it is confused) + */ - update = vnc_alloc_update(session); - DEBUGASSERT(update != NULL); + whupd = (memcmp(&intersection, &g_wholescreen, + sizeof(struct nxgl_rect_s)) == 0); - /* Clip and copy the rectangle into the update structure */ + /* Ignore any client update requests if there have been no changes to + * the framebuffer since the last whole screen update. + */ - update->rect.pt1.x = MAX(rect->pt1.x, 0); - update->rect.pt1.y = MAX(rect->pt1.y, 0); - update->rect.pt2.x = MIN(rect->pt2.x, (CONFIG_VNCSERVER_SCREENWIDTH - 1)); - update->rect.pt2.y = MIN(rect->pt2.y, (CONFIG_VNCSERVER_SCREENHEIGHT - 1)); - - /* Make sure that the rectangle still has area after clipping */ - - if (nxgl_nullrect(rect)) + sched_lock(); + if (!change && !session->change) { - /* No.. free the structure and ignore the update */ + /* No.. ignore the client update. We have nothing new to report. */ - vnc_free_update(session, update); + sched_unlock(); + return OK; } - else + + /* Ignore all updates if there is a queued whole screen update */ + + if (session->nwhupd == 0) { - /* Yes.. add the upate to the end of the update queue. */ + /* No whole screen updates in the queue. Is this a new whole + * screen update? + */ + + if (whupd) + { + /* Yes.. Discard all of the previously queued updates */ + + FAR struct vnc_fbupdate_s *curr; + FAR struct vnc_fbupdate_s *next; + + updvdbg("New whole screen update...\n"); + + curr = (FAR struct vnc_fbupdate_s *)session->updqueue.head; + sq_init(&session->updqueue); + sem_reset(&session->queuesem, 0); + + for (; curr != NULL; curr = next) + { + next = curr->flink; + vnc_free_update(session, curr); + } + + /* One whole screen update will be queued. There have been + * no frame buffer data changes since this update was queued. + */ + + session->nwhupd = 1; + session->change = false; + } + else + { + /* We are not updating the whole screen. Remember if this + * update (OR a preceding update) was due to a data change. + */ + + session->change |= change; + } + + /* Allocate an update structure... waiting if necessary */ + + update = vnc_alloc_update(session); + DEBUGASSERT(update != NULL); + + /* Copy the clipped rectangle into the update structure */ + + update->whupd = whupd; + nxgl_rectcopy(&update->rect, &intersection); + + /* Add the upate to the end of the update queue. */ vnc_add_queue(session, update); + + updvdbg("Queued {(%d, %d),(%d, %d)}\n", + intersection.pt1.x, intersection.pt1.y, + intersection.pt2.x, intersection.pt2.y); } + + sched_unlock(); } /* Since we ignore bad rectangles and wait for updata structures, there is diff --git a/include/nuttx/board.h b/include/nuttx/board.h index 0d742257e3c..9e0ea70ab80 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/board.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -46,7 +46,8 @@ * definitions provide the common interface between NuttX and the * architecture-specific implementation in arch/ * - * These definitions are retained in the the header file nuttx/include/arch.h + * These definitions are retained in the the header file + * nuttx/include/arch.h * * NOTE: up_ is supposed to stand for microprocessor; the u is like the * Greek letter micron: µ. So it would be µP which is a common shortening @@ -680,7 +681,8 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler); ****************************************************************************/ #ifdef CONFIG_BOARD_CRASHDUMP -void board_crashdump(uint32_t currentsp, void *tcb, uint8_t *filename, +void board_crashdump(uintptr_t currentsp, FAR void *tcb, + FAR const uint8_t *filename, int lineno); #endif diff --git a/include/nuttx/video/rfb.h b/include/nuttx/video/rfb.h index 02e15b143f0..0b1c13821c0 100644 --- a/include/nuttx/video/rfb.h +++ b/include/nuttx/video/rfb.h @@ -370,8 +370,8 @@ struct rfb_setpixelformat_s struct rfb_setencodings_s { uint8_t msgtype; /* U8 Message type */ - uint8_t padding[3]; - uint8_t nencodings[4]; /* U32 Number of encodings */ + uint8_t padding; + uint8_t nencodings[2]; /* U16 Number of encodings */ uint8_t encodings[4]; /* S32 Encoding type, size = 4*nencodings */ }; @@ -691,6 +691,12 @@ struct rfb_copyrect_encoding_s * the header:" */ +struct rfb_rrehdr8_s +{ + uint8_t nsubrects[4]; /* U32 Number of sub-rectangle */ + uint8_t pixel; /* U8 Background pixel */ +}; + struct rfb_rrehdr16_s { uint8_t nsubrects[4]; /* U32 Number of sub-rectangle */ @@ -707,6 +713,15 @@ struct rfb_rrehdr32_s * structure:" */ +struct rfb_rrerect8_s +{ + uint8_t pixel; /* U8 sub-rect pixel value */ + uint8_t xpos[2]; /* U16 X position */ + uint8_t ypos[2]; /* U16 Y position */ + uint8_t width[2]; /* U16 Width */ + uint8_t height[2]; /* U16 Height */ +}; + struct rfb_rrerect16_s { uint8_t pixel[2]; /* U16 sub-rect pixel value */ @@ -771,6 +786,11 @@ struct rfb_rrerect32_s * background colour for this tile:" */ +struct rfb_backpixel8_s +{ + uint8_t pixel; /* U8 Background pixel value */ +}; + struct rfb_backpixel16_s { uint8_t pixel[2]; /* U16 Background pixel value */ @@ -788,6 +808,11 @@ struct rfb_backpixel32_s * foreground colour to be used for all subrectangles in this tile:" */ +struct rfb_forepixel8_s +{ + uint8_t pixel; /* U8 Foreground pixel value */ +}; + struct rfb_forepixel16_s { uint8_t pixel[2]; /* U16 Foreground pixel value */ @@ -816,6 +841,13 @@ struct rfb_nrects_s * value giving the colour of that subrectangle, so a subrectangle is:" */ +struct rfb_subrectscolored8_s +{ + uint8_t pixel; /* U8 Sub-rect pixel value */ + uint8_t xy; /* U8 X and y position */ + uint8_t wh; /* U8 Width and height */ +}; + struct rfb_subrectscolored16_s { uint8_t pixel[2]; /* U16 Sub-rect pixel value */ @@ -916,6 +948,14 @@ struct rfb_srle_s * height are the width and height of the tile):" */ +struct rfb_rawpixel8_s +{ + uint8_t pixels[1]; /* Actual size is w*h */ +}; + +#define SIZEOF_RFB_RAWPIXEL8_S(n,r) \ + (sizeof(struct rfb_rawpixel8_s) + (n) - 1) + struct rfb_rawpixel16_s { uint8_t pixels[2]; /* Actual size is 2*w*h */ @@ -934,6 +974,11 @@ struct rfb_rawpixel32_s /* "A solid tile consisting of a single colour. The pixel value follows:" */ +struct rfb_solid8_s +{ + uint8_t pixels; /* Pixel value */ +}; + struct rfb_solid16_s { uint8_t pixels[2]; /* Pixel value */ @@ -977,6 +1022,11 @@ struct rfb_solid32_s * (subencoding − 128) pixel values:" */ +struct rfb_palette8_s +{ + uint8_t palette[1]; /* Actual size is palleteSize */ +}; + struct rfb_palette16_s { uint8_t palette[2]; /* Actual size is 2*palleteSize */ @@ -1081,6 +1131,48 @@ struct rfb_palettendx_s ((uint32_t)((s)[2]) << 8) | \ (uint32_t)((s)[3])) +/* There are also cases where the client may request pixel data in its + * little-endian format. + */ + +/* void rfb_putle16(FAR uint8_t *dest, uint16_t value) */ + +#define rfb_putle16(d,v) \ + do \ + { \ + register FAR uint8_t *__d = (FAR uint8_t *)(d); \ + *__d++ = ((uint16_t)(v) & 0xff); \ + *__d = ((uint16_t)(v) >> 8); \ + } \ + while (0) + +/* uin16_t rfb_getle16(FAR const uint8_t *src) */ + +#define rfb_getle16(s) \ + (((uint16_t)((s)[1]) << 8) | \ + (uint16_t)((s)[0])) + +/* void rfb_putle32(FAR uint8_t *dest, uint32_t value) */ + +#define rfb_putle32(d,v) \ + do \ + { \ + register FAR uint8_t *__d = (FAR uint8_t *)(d); \ + *__d++ = ((uint32_t)(v) & 0xff); \ + *__d++ = ((uint32_t)(v) >> 8) & 0xff; \ + *__d++ = ((uint32_t)(v) >> 16) & 0xff; \ + *__d = ((uint32_t)(v) >> 24); \ + } \ + while (0) + +/* uint32_t rfb_getle32(FAR const uint8_t *src) */ + +#define rfb_getle32(s) \ + (((uint32_t)((s)[3]) << 24) | \ + ((uint32_t)((s)[2]) << 16) | \ + ((uint32_t)((s)[1]) << 8) | \ + (uint32_t)((s)[0])) + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/include/nuttx/video/vnc.h b/include/nuttx/video/vnc.h new file mode 100644 index 00000000000..fdb1dfd4a93 --- /dev/null +++ b/include/nuttx/video/vnc.h @@ -0,0 +1,212 @@ +/**************************************************************************** + * include/nuttx/video/vnc.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_VIDEO_VNC_H +#define __INCLUDE_NUTTX_VIDEO_VNC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/* These are the types of the function pointers used to support callouts when + * mouse or keyboard inputs are received by the local VNC server from the + * remove VNC client. Notice that these callouts have arguments that match + * the inputs to nx_kbdin() and nx_mousein(). + */ + +typedef CODE void (*vnc_mouseout_t)(FAR void *arg, nxgl_coord_t x, + nxgl_coord_t y, uint8_t buttons); +typedef CODE void (*vnc_kbdout_t)(FAR void *arg, uint8_t nch, + FAR const uint8_t *ch); + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Function: vnc_fbinitialize + * + * Description: + * Initialize the VNC frame buffer driver. The VNC frame buffer driver + * supports two initialization interfaces: The standard up_fbinitialize() + * that will be called from the graphics layer and this speical + * initialization function that can be used only by VNC aware OS logic. + * + * The two initialization functions may be called separated or together in + * either order. The difference is that standard up_fbinitialize(), if + * used by itself, will not have any remote mouse or keyboard inputs that + * are reported to the VNC framebuffer driver from the remote VNC client. + * + * In the standard graphics architecture, the keyboard/mouse inputs are + * received by some appliation/board specific logic at the highest level + * in the architecture via input drivers. The received keyboard/mouse + * input data must then be "injected" into NX where it can they can be + * assigned to the window that has focus. They will eventually be + * received by the Window instances via NX callback methods. + * + * NX is a middleware layer in the architecture, below the + * application/board specific logic but above the driver level logic. The + * frame buffer driver, on the other hand lies at the very lowest level in + * the graphics architecture. It cannot call upward into the application + * nor can it call upward into NX. So, some other logic. + * + * vnc_fbinitialize() provides an optional, alternative initialization + * function. It is optional becuase it need not be called. If it is not + * called, however, keyboard/mouse inputs from the remote VNC client will + * be lost. By calling vnc_fbinitialize(), you can provide callout + * functions that can be received by logic higher in the architure. This + * higher level level callouts can then call nx_kbdin() or nx_mousein() on + * behalf of the VNC server. + * + * See also vnc_default_fbinitialize() below. + * + * Parameters: + * display - In the case of hardware with multiple displays, this + * specifies the display. Normally this is zero. + * kbdout - If non-NULL, then the pointed-to function will be called to + * handle all keyboard input as it is received. This may be either raw, + * ASCII keypress input or encoded keyboard input as determined by + * CONFIG_VNCSERVER_KBDENCODE. See include/nuttx/input/kbd_codec.h. + * mouseout - If non-NULL, then the pointed-to function will be called to + * handle all mouse input as it is received. + * arg - An opaque user provided argument that will be provided when the + * callouts are performed. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +int vnc_fbinitialize(int display, vnc_kbdout_t kbdout, + vnc_mouseout_t mouseout, FAR void *arg); + +/**************************************************************************** + * Function: vnc_mouse and vnc_kbdout + * + * Description: + * These are the default keyboard/mouse callout functions. They are + * simply wrappers around nx_mousein() and nx_kdbout(), respectively. When + * configured using vnc_fbinitialize(), the 'arg' must be the correct + * NXHANDLE value. + * + * See also vnc_default_fbinitialize() below. + * + * Parameters: + * See vnc_mouseout_t and vnc_kbdout_t typde definitions above. These + * callouts have arguments that match the inputs to nx_kbdin() and + * nx_mousein() (if arg is really of type NXHANDLE). + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_NX_KBD +void vnc_kbdout(FAR void *arg, uint8_t nch, FAR const uint8_t *ch); +#endif + +#ifdef CONFIG_NX_XYINPUT +void vnc_mouseout(FAR void *arg, nxgl_coord_t x, nxgl_coord_t y, + uint8_t buttons); +#endif + +/**************************************************************************** + * Function: vnc_default_fbinitialize + * + * Description: + * This is just a wrapper around vnc_fbinitialize() that will establish + * the default mouse and keyboard callout functions. + * + * Parameters: + * display - In the case of hardware with multiple displays, this + * specifies the display. Normally this is zero. + * handle - And instance of NXHANDLE returned from initialization of the + * NX graphics system for that display. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +/* int vnc_default_fbinitialize(int display, NXHANDLE handle); */ + +#if defined(CONFIG_NX_KBD) && defined(CONFIG_NX_XYINPUT) + +#define vnc_default_fbinitialize(d,h) \ + vnc_fbinitialize((d), vnc_kbdout, vnc_mouseout, (FAR void *)(h)) + +#elif defined(CONFIG_NX_KBD) + +#define vnc_default_fbinitialize(d,h) \ + vnc_fbinitialize((d), vnc_kbdout, NULL, (FAR void *)(h)) + +#elif defined(CONFIG_NX_XYINPUT) + +#define vnc_default_fbinitialize(d,h) \ + vnc_fbinitialize((d), NULL, vnc_mouseout, (FAR void *)(h)) + +#else + +#define vnc_default_fbinitialize(d,h) \ + vnc_fbinitialize((d), NULL, NULL, NULL) + +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_VIDEO_VNC_H */