mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
Fixes for rendering fonts at 4bpp
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2682 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
NuttX TODO List (Last updated May 14, 2010)
|
NuttX TODO List (Last updated May 16, 2010)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
(5) Task/Scheduler (sched/)
|
(5) Task/Scheduler (sched/)
|
||||||
@@ -12,7 +12,7 @@ NuttX TODO List (Last updated May 14, 2010)
|
|||||||
(1) USB (drivers/usbdev)
|
(1) USB (drivers/usbdev)
|
||||||
(5) Libraries (lib/)
|
(5) Libraries (lib/)
|
||||||
(12) File system/Generic drivers (fs/, drivers/)
|
(12) File system/Generic drivers (fs/, drivers/)
|
||||||
(3) Graphics subystem (graphics/)
|
(2) Graphics subystem (graphics/)
|
||||||
(1) Pascal add-on (pcode/)
|
(1) Pascal add-on (pcode/)
|
||||||
(1) Documentation (Documentation/)
|
(1) Documentation (Documentation/)
|
||||||
(6) Build system / Toolchains
|
(6) Build system / Toolchains
|
||||||
@@ -430,12 +430,6 @@ o Graphics subystem (graphics/)
|
|||||||
Status: Open
|
Status: Open
|
||||||
Priority: Medium
|
Priority: Medium
|
||||||
|
|
||||||
Description: There is an issue with building NXGL on some newer tool chains
|
|
||||||
(gcc-4.2.2). The is s problem with the way that the isystem option
|
|
||||||
works with the -E option. See the full description under Build
|
|
||||||
Status: Open
|
|
||||||
Priority: This is a duplicate of an issue addressed under Build problems.
|
|
||||||
|
|
||||||
o Pascal Add-On (pcode/)
|
o Pascal Add-On (pcode/)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,10 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
|
|
||||||
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
||||||
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
||||||
|
|
||||||
lm3s_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
lm3s_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
||||||
lm3s_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
lm3s_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
||||||
|
|
||||||
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
||||||
|
|
||||||
/* Get the SSI port (configure as a Freescale SPI port) */
|
/* Get the SSI port (configure as a Freescale SPI port) */
|
||||||
@@ -110,7 +112,7 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
spi = up_spiinitialize(0);
|
spi = up_spiinitialize(0);
|
||||||
if (!spi)
|
if (!spi)
|
||||||
{
|
{
|
||||||
glldbg("Failed to initialize SPI port 0\n");
|
glldbg("Failed to initialize SSI port 0\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,10 +67,8 @@
|
|||||||
# define RENDERER nxf_convert_1bpp
|
# define RENDERER nxf_convert_1bpp
|
||||||
#elif CONFIG_EXAMPLES_NX_BPP == 2
|
#elif CONFIG_EXAMPLES_NX_BPP == 2
|
||||||
# define RENDERER nxf_convert_2bpp
|
# define RENDERER nxf_convert_2bpp
|
||||||
#elif CONFIG_EXAMPLES_NX_BPP == 2
|
|
||||||
# define RENDERER nxf_convert_4bpp
|
|
||||||
#elif CONFIG_EXAMPLES_NX_BPP == 4
|
#elif CONFIG_EXAMPLES_NX_BPP == 4
|
||||||
# define RENDERER nxf_convert_8bpp
|
# define RENDERER nxf_convert_4bpp
|
||||||
#elif CONFIG_EXAMPLES_NX_BPP == 8
|
#elif CONFIG_EXAMPLES_NX_BPP == 8
|
||||||
# define RENDERER nxf_convert_8bpp
|
# define RENDERER nxf_convert_8bpp
|
||||||
#elif CONFIG_EXAMPLES_NX_BPP == 16
|
#elif CONFIG_EXAMPLES_NX_BPP == 16
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* graphics/nxfonts/nxfonts_convert.c
|
* graphics/nxfonts/nxfonts_convert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -96,6 +96,14 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if NXFONTS_BITSPERPIXEL < 8
|
||||||
|
# ifdef CONFIG_NX_PACKEDMSFIRST
|
||||||
|
# define NXF_INITMASK (NXF_PIXELMASK << (8 - NXFONTS_BITSPERPIXEL))
|
||||||
|
# else
|
||||||
|
# define NXF_INITMASK NXF_PIXELMASK
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Form a function name by concatenating two strings */
|
/* Form a function name by concatenating two strings */
|
||||||
|
|
||||||
#define _NXF_FUNCNAME(a,b) a ## b
|
#define _NXF_FUNCNAME(a,b) a ## b
|
||||||
@@ -182,11 +190,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
|
|||||||
col = 0;
|
col = 0;
|
||||||
dptr = (FAR NXF_PIXEL_T*)line;
|
dptr = (FAR NXF_PIXEL_T*)line;
|
||||||
pixel = *dptr;
|
pixel = *dptr;
|
||||||
#ifdef CONFIG_NX_PACKEDMSFIRST
|
mask = NXF_INITMASK;
|
||||||
mask = NXF_PIXELMASK << (8 - NXFONTS_BITSPERPIXEL);
|
|
||||||
#else
|
|
||||||
mask = NXF_PIXELMASK;
|
|
||||||
#endif
|
|
||||||
nbits = 0;
|
nbits = 0;
|
||||||
|
|
||||||
for (bmndx = 0; bmndx < bm->metric.stride && col < width; bmndx++)
|
for (bmndx = 0; bmndx < bm->metric.stride && col < width; bmndx++)
|
||||||
@@ -216,7 +220,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
|
|||||||
{
|
{
|
||||||
*dptr++ = pixel;
|
*dptr++ = pixel;
|
||||||
pixel = *dptr;
|
pixel = *dptr;
|
||||||
mask = NXF_PIXELMASK;
|
mask = NXF_INITMASK;
|
||||||
nbits = 0;
|
nbits = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user