diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-18 17:16:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-18 17:16:24 +0000 |
commit | 769fef9a363e9255551008548571c4ffdb9c9af0 (patch) | |
tree | cff6766eb78229ad6f0f1cc3022553ededcc44df /nuttx/graphics | |
parent | fe8341e08ecd746bcbbe3f61205a896670cccaac (diff) | |
download | px4-nuttx-769fef9a363e9255551008548571c4ffdb9c9af0.tar.gz px4-nuttx-769fef9a363e9255551008548571c4ffdb9c9af0.tar.bz2 px4-nuttx-769fef9a363e9255551008548571c4ffdb9c9af0.zip |
Add NX configuration for LPCXpresso
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3521 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics')
-rw-r--r-- | nuttx/graphics/Makefile | 1 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/Make.defs | 7 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/Makefile.sources | 4 | ||||
-rw-r--r-- | nuttx/graphics/nxfonts/nxfonts_convert.c | 12 |
4 files changed, 20 insertions, 4 deletions
diff --git a/nuttx/graphics/Makefile b/nuttx/graphics/Makefile index 9475c368a..0c953b067 100644 --- a/nuttx/graphics/Makefile +++ b/nuttx/graphics/Makefile @@ -92,6 +92,7 @@ all: mklibgraphics gen1bppsources: @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES) + @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES) gen2bppsource: @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES) diff --git a/nuttx/graphics/nxfonts/Make.defs b/nuttx/graphics/nxfonts/Make.defs index 3f0c6e54b..0226f823d 100644 --- a/nuttx/graphics/nxfonts/Make.defs +++ b/nuttx/graphics/nxfonts/Make.defs @@ -34,7 +34,8 @@ ############################################################################ NXFONTS_ASRCS = -NXFCONV_CSRC = nxfonts_convert_2bpp.c nxfonts_convert_4bpp.c \ - nxfonts_convert_8bpp.c nxfonts_convert_16bpp.c \ - nxfonts_convert_24bpp.c nxfonts_convert_32bpp.c +NXFCONV_CSRC = nxfonts_convert_1bpp.c nxfonts_convert_2bpp.c \ + nxfonts_convert_4bpp.c nxfonts_convert_8bpp.c \ + nxfonts_convert_16bpp.c nxfonts_convert_24bpp.c \ + nxfonts_convert_32bpp.c NXFONTS_CSRCS = nxfonts_bitmaps.c nxfonts_getfont.c $(NXFCONV_CSRC)
\ No newline at end of file diff --git a/nuttx/graphics/nxfonts/Makefile.sources b/nuttx/graphics/nxfonts/Makefile.sources index adcc7b7c3..bd66b2f02 100644 --- a/nuttx/graphics/nxfonts/Makefile.sources +++ b/nuttx/graphics/nxfonts/Makefile.sources @@ -36,6 +36,10 @@ -include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs +ifeq ($(NXFONTS_BITSPERPIXEL),1) +NXFONTS_SUFFIX := _1bpp +CONV_CSRC := nxfonts_convert_1bpp.c +endif ifeq ($(NXFONTS_BITSPERPIXEL),2) NXFONTS_SUFFIX := _2bpp CONV_CSRC := nxfonts_convert_2bpp.c diff --git a/nuttx/graphics/nxfonts/nxfonts_convert.c b/nuttx/graphics/nxfonts/nxfonts_convert.c index 27549fa0c..c5afb759e 100644 --- a/nuttx/graphics/nxfonts/nxfonts_convert.c +++ b/nuttx/graphics/nxfonts/nxfonts_convert.c @@ -60,7 +60,17 @@ /* Set up bit blit macros for this BPP */ -#if NXFONTS_BITSPERPIXEL == 2 +#if NXFONTS_BITSPERPIXEL == 1 + +# define NXF_PIXELMASK 0x01 +# define NXF_SCALEX(x) ((x) >> 3) +# define NXF_PIXEL_T uint8_t +# define NXF_MULTIPIXEL(p) ((uint8_t)(p) << 7 | (uint8_t)(p) << 6 | \ + (uint8_t)(p) << 5 | (uint8_t)(p) << 4 | \ + (uint8_t)(p) << 3 | (uint8_t)(p) << 2 | \ + (uint8_t)(p) << 1 | (p)) + +#elif NXFONTS_BITSPERPIXEL == 2 # define NXF_PIXELMASK 0x03 # define NXF_SCALEX(x) ((x) >> 2) |