diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-21 00:01:41 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-21 00:01:41 +0000 |
commit | 91f06e2f2415bfa67e3b3bff3c2e6c838a413ec9 (patch) | |
tree | 6d64f376c12517a64f45787853a7b8b4dfd2d7fb | |
parent | 6407cb367e2856b7c8fb427cd420a6d58a179ce9 (diff) | |
download | px4-nuttx-91f06e2f2415bfa67e3b3bff3c2e6c838a413ec9.tar.gz px4-nuttx-91f06e2f2415bfa67e3b3bff3c2e6c838a413ec9.tar.bz2 px4-nuttx-91f06e2f2415bfa67e3b3bff3c2e6c838a413ec9.zip |
Add a NuttX logo image example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3805 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-x | apps/ChangeLog.txt | 3 | ||||
-rw-r--r-- | nuttx/Makefile | 4 | ||||
-rw-r--r-- | nuttx/configs/stm3210e-eval/nsh2/defconfig | 37 | ||||
-rw-r--r-- | nuttx/configs/stm3210e-eval/nx/defconfig | 37 | ||||
-rw-r--r-- | nuttx/configs/stm3210e-eval/nxtext/defconfig | 37 | ||||
-rw-r--r-- | nuttx/sched/sem_wait.c | 2 |
6 files changed, 117 insertions, 3 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index e468f49fb..712e1e4f7 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -79,3 +79,6 @@ built as an NSH "built-in" command. * apps/examples/nx, ntext, and nxhello: All updated to use the new NuttX font interfaces. + * apps/examples/nximage: Another super simple graphics example: It just puts + the NuttX logo in the center of the display. This example can also be + built as an NSH "built-in" command. diff --git a/nuttx/Makefile b/nuttx/Makefile index ceb816e96..dcb471430 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -255,7 +255,7 @@ $(TOPDIR)/.version: # Create the include/nuttx/version.h file include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion - tools/mkversion $(TOPDIR) > include/nuttx/version.h + @tools/mkversion $(TOPDIR) > include/nuttx/version.h # Build the mkconfig tool used to create include/nuttx/config.h @@ -265,7 +265,7 @@ tools/mkconfig: # Create the include/nuttx/config.h file include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig - tools/mkconfig $(TOPDIR) > include/nuttx/config.h + @tools/mkconfig $(TOPDIR) > include/nuttx/config.h # Link the apps/include directory to include/apps diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 951980caa..359e050e5 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -1038,6 +1038,43 @@ CONFIG_EXAMPLES_NXHELLO_BPP=16 CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n # +# Settings for examples/nximage +# +# CONFIG_EXAMPLES_NXIMAGE_BUILTIN -- Build the NXIMAGE example as a "built-in" +# that can be executed from the NSH command line +# CONFIG_EXAMPLES_NXIMAGE_VPLANE -- The plane to select from the frame- +# buffer driver for use in the test. Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_DEVNO - The LCD device to select from the LCD + driver for use in the test: Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_BPP -- Pixels per pixel to use. Valid options +# include 8, 16, and 24. Default is 16. +# CONFIG_EXAMPLES_NXIMAGE_XSCALEp5, CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0 -- The logo image width is 160 columns. +# One of these may be defined to rescale the image horizontally by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_YSCALEp5, CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 -- The logo image height is 160 rows. +# One of these may be defined to rescale the image vertically by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT - The driver for the graphics device on +# this platform requires some unusual initialization. This is the +# for, for example, SPI LCD/OLED devices. If this configuration is +# selected, then the platform code must provide an LCD initialization +# function. +# +CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y +CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 +CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 +CONFIG_EXAMPLES_NXIMAGE_BPP=16 +CONFIG_EXAMPLES_NXIMAGE_XSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_YSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n + +# # Stack and heap information # # CONFIG_BOOT_RUNFROMFLASH - Some configurations support XIP diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 44633cbc1..47f787a29 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -997,6 +997,43 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 CONFIG_EXAMPLES_NX_EXTERNINIT=n # +# Settings for examples/nximage +# +# CONFIG_EXAMPLES_NXIMAGE_BUILTIN -- Build the NXIMAGE example as a "built-in" +# that can be executed from the NSH command line +# CONFIG_EXAMPLES_NXIMAGE_VPLANE -- The plane to select from the frame- +# buffer driver for use in the test. Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_DEVNO - The LCD device to select from the LCD + driver for use in the test: Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_BPP -- Pixels per pixel to use. Valid options +# include 8, 16, and 24. Default is 16. +# CONFIG_EXAMPLES_NXIMAGE_XSCALEp5, CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0 -- The logo image width is 160 columns. +# One of these may be defined to rescale the image horizontally by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_YSCALEp5, CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 -- The logo image height is 160 rows. +# One of these may be defined to rescale the image vertically by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT - The driver for the graphics device on +# this platform requires some unusual initialization. This is the +# for, for example, SPI LCD/OLED devices. If this configuration is +# selected, then the platform code must provide an LCD initialization +# function. +# +CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n +CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 +CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 +CONFIG_EXAMPLES_NXIMAGE_BPP=16 +CONFIG_EXAMPLES_NXIMAGE_XSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_YSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n + +# # Stack and heap information # # CONFIG_BOOT_RUNFROMFLASH - Some configurations support XIP diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index 5b658f0ad..d586daf9f 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -1052,6 +1052,43 @@ CONFIG_EXAMPLES_NXTEXT_SERVERPRIO=120 CONFIG_EXAMPLES_NXTEXT_NOTIFYSIGNO=4 # +# Settings for examples/nximage +# +# CONFIG_EXAMPLES_NXIMAGE_BUILTIN -- Build the NXIMAGE example as a "built-in" +# that can be executed from the NSH command line +# CONFIG_EXAMPLES_NXIMAGE_VPLANE -- The plane to select from the frame- +# buffer driver for use in the test. Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_DEVNO - The LCD device to select from the LCD + driver for use in the test: Default: 0 +# CONFIG_EXAMPLES_NXIMAGE_BPP -- Pixels per pixel to use. Valid options +# include 8, 16, and 24. Default is 16. +# CONFIG_EXAMPLES_NXIMAGE_XSCALEp5, CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0 -- The logo image width is 160 columns. +# One of these may be defined to rescale the image horizontally by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_YSCALEp5, CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5, +# CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 -- The logo image height is 160 rows. +# One of these may be defined to rescale the image vertically by .5, 1.5, +# or 2.0. +# CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT - The driver for the graphics device on +# this platform requires some unusual initialization. This is the +# for, for example, SPI LCD/OLED devices. If this configuration is +# selected, then the platform code must provide an LCD initialization +# function. +# +CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n +CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 +CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 +CONFIG_EXAMPLES_NXIMAGE_BPP=16 +CONFIG_EXAMPLES_NXIMAGE_XSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_YSCALEp5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5=n +CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0=n +CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n + +# # Stack and heap information # # CONFIG_BOOT_RUNFROMFLASH - Some configurations support XIP diff --git a/nuttx/sched/sem_wait.c b/nuttx/sched/sem_wait.c index d7a38e555..e36de438d 100644 --- a/nuttx/sched/sem_wait.c +++ b/nuttx/sched/sem_wait.c @@ -171,7 +171,7 @@ int sem_wait(FAR sem_t *sem) #endif /* Add the TCB to the prioritized semaphore wait queue */ - errno = OK; + errno = 0; up_block_task(rtcb, TSTATE_WAIT_SEM); /* When we resume at this point, either (1) the semaphore has been |