summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-07-19 20:08:28 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-07-19 20:08:28 +0000
commitd9e22709216217725ba4dd76d4bb838c1f1627b6 (patch)
treeafb799c4411fe56a1af05c4e25d5f44453691cbe
parent1d6680d308c77966b60ba297fed9f3b5addfceab (diff)
Setup environment to support multiple fonts
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3799 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r--apps/examples/nx/nx_kbdin.c2
-rw-r--r--apps/examples/nx/nx_main.c2
-rw-r--r--apps/examples/nxhello/nxhello_bkgd.c6
-rw-r--r--apps/examples/nxtext/nxtext_bkgd.c2
-rw-r--r--apps/examples/nxtext/nxtext_popup.c2
-rw-r--r--apps/examples/nxtext/nxtext_putc.c4
-rw-r--r--nuttx/Documentation/NXGraphicsSubsystem.html22
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html6
-rw-r--r--nuttx/configs/README.txt7
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/dhcpd/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/httpd/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/nettest/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/nsh/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/defconfig4
-rw-r--r--nuttx/configs/ez80f910200zco/poll/defconfig4
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nx/defconfig4
-rwxr-xr-xnuttx/configs/lm3s8962-ek/nx/defconfig4
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nx/defconfig4
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nx/defconfig4
-rwxr-xr-xnuttx/configs/sam3u-ek/knsh/defconfig4
-rwxr-xr-xnuttx/configs/sam3u-ek/nsh/defconfig4
-rwxr-xr-xnuttx/configs/sam3u-ek/nx/defconfig4
-rw-r--r--nuttx/configs/sim/nx/defconfig4
-rw-r--r--nuttx/configs/sim/nx/defconfig-x114
-rw-r--r--nuttx/configs/stm3210e-eval/nsh2/defconfig4
-rw-r--r--nuttx/configs/stm3210e-eval/nx/defconfig4
-rw-r--r--nuttx/configs/stm3210e-eval/nxtext/defconfig4
-rw-r--r--nuttx/graphics/README.txt6
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_bitmaps.c8
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_getfont.c18
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_internal.h4
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_sans23x27.h (renamed from nuttx/graphics/nxfonts/nxfonts_sans.h)26
-rw-r--r--nuttx/include/nuttx/nxfonts.h65
-rw-r--r--nuttx/include/nuttx/sched.h2
-rw-r--r--nuttx/sched/sem_timedwait.c4
36 files changed, 156 insertions, 106 deletions
diff --git a/apps/examples/nx/nx_kbdin.c b/apps/examples/nx/nx_kbdin.c
index 2382725332..66d54b0469 100644
--- a/apps/examples/nx/nx_kbdin.c
+++ b/apps/examples/nx/nx_kbdin.c
@@ -323,7 +323,7 @@ nxeg_getglyph(FAR struct nxeg_state_s *st, uint8_t ch)
{
/* No, it is not cached... Does the code map to a glyph? */
- bm = nxf_getbitmap(ch);
+ bm = nxf_getbitmap(ch, NXFONT_DEFAULT);
if (!bm)
{
/* No, there is no glyph for this code. Use space */
diff --git a/apps/examples/nx/nx_main.c b/apps/examples/nx/nx_main.c
index d8b1eaba09..72e8fe2ca4 100644
--- a/apps/examples/nx/nx_main.c
+++ b/apps/examples/nx/nx_main.c
@@ -179,7 +179,7 @@ static void nxeg_initstate(FAR struct nxeg_state_s *st, int wnum,
*/
#ifdef CONFIG_NX_KBD
- fontset = nxf_getfontset();
+ fontset = nxf_getfontset(NXFONT_DEFAULT);
st->nchars = 0;
st->nglyphs = 0;
st->height = fontset->mxheight;
diff --git a/apps/examples/nxhello/nxhello_bkgd.c b/apps/examples/nxhello/nxhello_bkgd.c
index 950d6e8372..9ec3e51416 100644
--- a/apps/examples/nxhello/nxhello_bkgd.c
+++ b/apps/examples/nxhello/nxhello_bkgd.c
@@ -228,7 +228,7 @@ static void nxhello_center(FAR struct nxgl_point_s *pos,
{
/* Get the font bitmap for this character */
- fbm = nxf_getbitmap(*ptr);
+ fbm = nxf_getbitmap(*ptr, NXFONT_DEFAULT);
if (fbm)
{
/* Add the font size */
@@ -353,7 +353,7 @@ void nxhello_hello(NXWINDOW hwnd)
/* Get information about the font we are going to use */
- fontset = nxf_getfontset();
+ fontset = nxf_getfontset(NXFONT_DEFAULT);
/* Allocate a bit of memory to hold the largest rendered font */
@@ -377,7 +377,7 @@ void nxhello_hello(NXWINDOW hwnd)
{
/* Get the bitmap font for this ASCII code */
- fbm = nxf_getbitmap(*ptr);
+ fbm = nxf_getbitmap(*ptr, NXFONT_DEFAULT);
if (fbm)
{
uint8_t fheight; /* Height of this glyph (in rows) */
diff --git a/apps/examples/nxtext/nxtext_bkgd.c b/apps/examples/nxtext/nxtext_bkgd.c
index d94f19dc13..e711c84bbb 100644
--- a/apps/examples/nxtext/nxtext_bkgd.c
+++ b/apps/examples/nxtext/nxtext_bkgd.c
@@ -402,7 +402,7 @@ FAR struct nxtext_state_s *nxbg_getstate(void)
* state structure
*/
- fontset = nxf_getfontset();
+ fontset = nxf_getfontset(NXFONT_DEFAULT);
g_bgstate.fheight = fontset->mxheight;
g_bgstate.fwidth = fontset->mxwidth;
g_bgstate.spwidth = fontset->spwidth;
diff --git a/apps/examples/nxtext/nxtext_popup.c b/apps/examples/nxtext/nxtext_popup.c
index 33170019fa..bf9fbae192 100644
--- a/apps/examples/nxtext/nxtext_popup.c
+++ b/apps/examples/nxtext/nxtext_popup.c
@@ -304,7 +304,7 @@ static inline void nxpu_initstate(void)
*/
#ifdef CONFIG_NX_KBD
- fontset = nxf_getfontset();
+ fontset = nxf_getfontset(NXFONT_DEFAULT);
g_pustate.fheight = fontset->mxheight;
g_pustate.fwidth = fontset->mxwidth;
g_pustate.spwidth = fontset->spwidth;
diff --git a/apps/examples/nxtext/nxtext_putc.c b/apps/examples/nxtext/nxtext_putc.c
index b9c9417a84..87da2ad6e0 100644
--- a/apps/examples/nxtext/nxtext_putc.c
+++ b/apps/examples/nxtext/nxtext_putc.c
@@ -332,7 +332,7 @@ static int nxtext_fontsize(uint8_t ch, FAR struct nxgl_size_s *size)
/* No, it is not cached... Does the code map to a font? */
- fbm = nxf_getbitmap(ch);
+ fbm = nxf_getbitmap(ch, NXFONT_DEFAULT);
if (fbm)
{
/* Yes.. return the font size */
@@ -362,7 +362,7 @@ nxtext_getglyph(FAR struct nxtext_state_s *st, uint8_t ch)
{
/* No, it is not cached... Does the code map to a font? */
- fbm = nxf_getbitmap(ch);
+ fbm = nxf_getbitmap(ch, NXFONT_DEFAULT);
if (fbm)
{
/* Yes.. render the glyph */
diff --git a/nuttx/Documentation/NXGraphicsSubsystem.html b/nuttx/Documentation/NXGraphicsSubsystem.html
index 065f00b7a2..9342552663 100644
--- a/nuttx/Documentation/NXGraphicsSubsystem.html
+++ b/nuttx/Documentation/NXGraphicsSubsystem.html
@@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NX Graphics Subsystem</i>
</font></big></h1>
- <p>Last Updated: July 10, 2011</p>
+ <p>Last Updated: July 19, 2011</p>
</td>
</tr>
</table>
@@ -2402,14 +2402,18 @@ struct nx_font_s
#include &lt;nuttx/nxglib.h&gt;
#include &lt;nuttx/nxfonts.h&gt;
-FAR const struct nx_font_s *nxf_getfontset(void);
+FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid);
</pre></ul>
<p>
<b>Description:</b>
Return information about the current font set.
</p>
<p>
- <b>Input Parameters:</b> None
+ <b>Input Parameters:</b>
+ <ul><dl>
+ <dt><code>fontid</code>
+ <dd>Identifies the font set to get
+ </dl></ul>
</p>
<p>
<b>Returned Value:</b>
@@ -2422,7 +2426,7 @@ FAR const struct nx_font_s *nxf_getfontset(void);
#include &lt;nuttx/nxglib.h&gt;
#include &lt;nuttx/nxfonts.h&gt;
-FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch);
+FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch, enum nx_fontid_e fontid);
</pre></ul>
<p>
<b>Description:</b>
@@ -2431,8 +2435,10 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch);
<p>
<b>Input Parameters:</b>
<ul><dl>
- <dt><code></code>
+ <dt><code>ch</code>
<dd>
+ <dt><code>fontid</code>
+ <dd>Identifies the font set to use
</dl></ul>
</p>
<p>
@@ -2676,9 +2682,9 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
<dt><code>CONFIG_NXFONTS_CHARBITS</code>:
<dd>The number of bits in the character set. Current options are
only 7 and 8. The default is 7.
- <dt><code>CONFIG_NXFONT_SANS</code>:
- <dd>At present, there is only one font. But if there were were more,
- then this option would select the sans serif font.
+ <dt><code>CONFIG_NXFONT_SANS23X27</code>:
+ <dd>At present, there is only one font, a 23x27 san serif font.
+ But if there were were more, then this option would select that sans serif font.
</dl>
</ul>
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index ba2c65402e..22dfbb1f62 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -4476,9 +4476,9 @@ build
only 7 and 8. The default is 7.
</li>
<li>
- <code>CONFIG_NXFONT_SANS</code>:
- At present, there is only one font. But if there were were more,
- then this option would select the sans serif font.
+ <code>CONFIG_NXFONT_SANS23X27</code>:
+ At present, there is only one font, a 23x27 sans serif font.
+ But if there were were more, then this option would select that sans serif font.
</li>
</ul>
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 95ff0f7b82..57c74babdc 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -973,9 +973,10 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_NXFONTS_CHARBITS
The number of bits in the character set. Current options are
only 7 and 8. The default is 7.
- CONFIG_NXFONT_SANS
- At present, there is only one font. But if there were were more,
- then this option would select the sans serif font.
+ CONFIG_NXFONT_SANS23X27
+ At present, there is only one font, a 23x27 sans serif font. But
+ if there were were more, then this option would select that sans serif
+ font.
NX Multi-user only options:
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index 886533daa4..5fea9f7a4f 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -572,7 +572,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -605,7 +605,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
index ca499c9a48..40cbb674a2 100644
--- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
@@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -613,7 +613,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig
index 09acb43f3c..5e2801348e 100644
--- a/nuttx/configs/ez80f910200zco/httpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/httpd/defconfig
@@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -613,7 +613,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig
index 6923717d48..9468c7b5b9 100644
--- a/nuttx/configs/ez80f910200zco/nettest/defconfig
+++ b/nuttx/configs/ez80f910200zco/nettest/defconfig
@@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -613,7 +613,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig
index 43c0a3de18..60abb1e772 100644
--- a/nuttx/configs/ez80f910200zco/nsh/defconfig
+++ b/nuttx/configs/ez80f910200zco/nsh/defconfig
@@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -613,7 +613,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index 054e9fe0aa..7649d22bd3 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -575,7 +575,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -608,7 +608,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig
index c2a7401527..133ef6a753 100644
--- a/nuttx/configs/ez80f910200zco/poll/defconfig
+++ b/nuttx/configs/ez80f910200zco/poll/defconfig
@@ -580,7 +580,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -613,7 +613,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index 759c14d3a7..2a8bb6e990 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -548,7 +548,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -584,7 +584,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=8
CONFIG_NXTK_BORDERCOLOR2=4
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig
index e76f69a9e5..0ccbe5e023 100755
--- a/nuttx/configs/lm3s8962-ek/nx/defconfig
+++ b/nuttx/configs/lm3s8962-ek/nx/defconfig
@@ -548,7 +548,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -584,7 +584,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=8
CONFIG_NXTK_BORDERCOLOR2=4
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
index 477ca4ef77..c54eec489c 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
@@ -759,7 +759,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -795,7 +795,7 @@ CONFIG_NXTK_BORDERWIDTH=2
CONFIG_NXTK_BORDERCOLOR1=1
CONFIG_NXTK_BORDERCOLOR2=0
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
index 1ffd9defe8..309bf31acb 100755
--- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
@@ -739,7 +739,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -775,7 +775,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=8
CONFIG_NXTK_BORDERCOLOR2=4
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig
index 51f83efc34..ddf6a23ff6 100755
--- a/nuttx/configs/sam3u-ek/knsh/defconfig
+++ b/nuttx/configs/sam3u-ek/knsh/defconfig
@@ -702,7 +702,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -738,7 +738,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig
index 9294603f49..8cbbbdcb1c 100755
--- a/nuttx/configs/sam3u-ek/nsh/defconfig
+++ b/nuttx/configs/sam3u-ek/nsh/defconfig
@@ -672,7 +672,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -708,7 +708,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig
index ea1b609367..c50d242e11 100755
--- a/nuttx/configs/sam3u-ek/nx/defconfig
+++ b/nuttx/configs/sam3u-ek/nx/defconfig
@@ -681,7 +681,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -717,7 +717,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig
index 2962d6b0bc..d4688ea498 100644
--- a/nuttx/configs/sim/nx/defconfig
+++ b/nuttx/configs/sim/nx/defconfig
@@ -369,7 +369,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -402,7 +402,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/sim/nx/defconfig-x11 b/nuttx/configs/sim/nx/defconfig-x11
index 27a6a51fa0..9228786dfe 100644
--- a/nuttx/configs/sim/nx/defconfig-x11
+++ b/nuttx/configs/sim/nx/defconfig-x11
@@ -369,7 +369,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -402,7 +402,7 @@ CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERCOLOR1
#CONFIG_NXTK_BORDERCOLOR2
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig
index 988d659e4b..951980caac 100644
--- a/nuttx/configs/stm3210e-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig
@@ -775,7 +775,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -811,7 +811,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig
index bf6e25e7a6..44633cbc17 100644
--- a/nuttx/configs/stm3210e-eval/nx/defconfig
+++ b/nuttx/configs/stm3210e-eval/nx/defconfig
@@ -767,7 +767,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -803,7 +803,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig
index 98efcf9a79..5b658f0ad8 100644
--- a/nuttx/configs/stm3210e-eval/nxtext/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig
@@ -767,7 +767,7 @@ CONFIG_USBSTRG_REMOVABLE=y
# CONFIG_NXFONTS_CHARBITS
# The number of bits in the character set. Current options are
# only 7 and 8. The default is 7.
-# CONFIG_NXFONT_SANS
+# CONFIG_NXFONT_SANS23X27
# At present, there is only one font. But if there were were more,
# then this option would select the sans serif font.
#
@@ -803,7 +803,7 @@ CONFIG_NX_KBD=y
CONFIG_NXTK_BORDERCOLOR1=0xd69a
CONFIG_NXTK_BORDERCOLOR2=0xad55
CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS=y
+CONFIG_NXFONT_SANS23X27=y
CONFIG_NXFONTS_CHARBITS=7
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
diff --git a/nuttx/graphics/README.txt b/nuttx/graphics/README.txt
index 1822067ade..c99a72809c 100644
--- a/nuttx/graphics/README.txt
+++ b/nuttx/graphics/README.txt
@@ -118,9 +118,9 @@ CONFIG_NXTK_AUTORAISE
CONFIG_NXFONTS_CHARBITS
The number of bits in the character set. Current options are only 7 and 8.
The default is 7.
-CONFIG_NXFONT_SANS
- At present, there is only one font. But if there were were more, then this
- option would select the sans serif font.
+CONFIG_NXFONT_SANS23X27
+ At present, there is only one font, a 23x27 sans serif fount. But if
+ there were were more, then this option would select that sans serif font.
NX Multi-user only options:
diff --git a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
index f215260cfe..622c4c0f3e 100644
--- a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
+++ b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
@@ -1,7 +1,7 @@
/****************************************************************************
* graphics/nxfonts/nxfonts_bitmap.h
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -46,10 +46,10 @@
/* Pick the fontset */
-#ifdef CONFIG_NXFONT_SANS
-# include "nxfonts_sans.h"
+#ifdef CONFIG_NXFONT_SANS23X27
+# include "nxfonts_sans23x27.h"
#else
-# include "nxfonts_sans.h"
+# include "nxfonts_sans23x27.h"
#endif
/****************************************************************************
diff --git a/nuttx/graphics/nxfonts/nxfonts_getfont.c b/nuttx/graphics/nxfonts/nxfonts_getfont.c
index 3c53cae7f7..52b7774a80 100644
--- a/nuttx/graphics/nxfonts/nxfonts_getfont.c
+++ b/nuttx/graphics/nxfonts/nxfonts_getfont.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * graphics/nxfonts/nxfonts_getfont.h
+ * graphics/nxfonts/nxfonts_getfont.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -52,6 +52,10 @@
****************************************************************************/
/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/****************************************************************************
* Private Data
****************************************************************************/
@@ -115,11 +119,11 @@ static inline FAR const struct nx_fontset_s *nxf_getglyphset(uint16_t ch)
* Return information about the current font set
*
* Input Parameters:
- * None
+ * fontid: Identifies the font set to get
*
****************************************************************************/
-FAR const struct nx_font_s *nxf_getfontset(void)
+FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid)
{
return &g_fonts;
}
@@ -131,11 +135,13 @@ FAR const struct nx_font_s *nxf_getfontset(void)
* Return font bitmap information for the selected character encoding.
*
* Input Parameters:
- * ch - character code
+ * ch: Character code
+ * fontid: Identifies the font set to use
*
****************************************************************************/
-FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch)
+FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch,
+ enum nx_fontid_e fontid)
{
FAR const struct nx_fontset_s *set = nxf_getglyphset(ch);
FAR const struct nx_fontbitmap_s *bm = NULL;
diff --git a/nuttx/graphics/nxfonts/nxfonts_internal.h b/nuttx/graphics/nxfonts/nxfonts_internal.h
index c8118d169a..54c574fdc1 100644
--- a/nuttx/graphics/nxfonts/nxfonts_internal.h
+++ b/nuttx/graphics/nxfonts/nxfonts_internal.h
@@ -1,7 +1,7 @@
/****************************************************************************
* graphics/nxfonts/nxfonts_internal.h
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
/* Only font supported for now */
-#define CONFIG_NXFONT_SANS 1
+#define CONFIG_NXFONT_SANS23X27 1
/****************************************************************************
* Public Types
diff --git a/nuttx/graphics/nxfonts/nxfonts_sans.h b/nuttx/graphics/nxfonts/nxfonts_sans23x27.h
index 963587fd99..998eb862fc 100644
--- a/nuttx/graphics/nxfonts/nxfonts_sans.h
+++ b/nuttx/graphics/nxfonts/nxfonts_sans23x27.h
@@ -1,7 +1,7 @@
/****************************************************************************
- * graphics/nxfonts/nxfonts_sans.h
+ * graphics/nxfonts/nxfonts_sans23x27.h
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@
*
****************************************************************************/
-#ifndef __GRAPHICS_NXFONTS_NXFONTS_SANS_H
-#define __GRAPHICS_NXFONTS_NXFONTS_SANS_H
+#ifndef __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H
+#define __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H
/****************************************************************************
* Included Files
@@ -44,18 +44,22 @@
* Pre-Processor Definitions
****************************************************************************/
+/* Font ID */
+
+#define NXFONT_ID FONTID_SANS23X27
+
/* Ranges of 7-bit and 8-bit fonts */
-#define NXFONT_MIN7BIT 33
-#define NXFONT_MAX7BIT 126
+#define NXFONT_MIN7BIT 33
+#define NXFONT_MAX7BIT 126
-#define NXFONT_MIN8BIT 161
-#define NXFONT_MAX8BIT 255
+#define NXFONT_MIN8BIT 161
+#define NXFONT_MAX8BIT 255
/* Maximum height and width of any glyph in the set */
-#define NXFONT_MAXHEIGHT 23
-#define NXFONT_MAXWIDTH 27
+#define NXFONT_MAXHEIGHT 23
+#define NXFONT_MAXWIDTH 27
/* The width of a space */
@@ -852,5 +856,5 @@ extern "C" {
}
#endif
-#endif /* __GRAPHICS_NXFONTS_NXFONTS_SANS_H */
+#endif /* __GRAPHICS_NXFONTS_NXFONTS_SANS23X27_H */
diff --git a/nuttx/include/nuttx/nxfonts.h b/nuttx/include/nuttx/nxfonts.h
index 8bef4b00a2..5cc715166f 100644
--- a/nuttx/include/nuttx/nxfonts.h
+++ b/nuttx/include/nuttx/nxfonts.h
@@ -48,20 +48,37 @@
/****************************************************************************
* Pre-processor definitions
****************************************************************************/
+/* Select the default font. If no fonts are select, then a compilation error
+ * is likely down the road.
+ */
+
+#ifdef CONFIG_NXFONT_SANS23X27
+# define NXFONT_DEFAULT FONTID_SANS23X27
+#endif
/****************************************************************************
* Public Types
****************************************************************************/
+/* Font IDs */
+
+enum nx_fontid_e
+{
+ FONTID_DEFAULT = 0 /* The default font */
+#ifdef CONFIG_NXFONT_SANS23X27
+ , FONTID_SANS23X27 /* The 23x27 sans serif font */
+#endif
+};
+
/* This structures provides the metrics for one glyph */
struct nx_fontmetric_s
{
- uint32_t stride : 2; /* Width of one font row in bytes */
- uint32_t width : 6; /* Width of the font in bits */
- uint32_t height : 6; /* Height of the font in rows */
- uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */
- uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */
+ uint32_t stride : 2; /* Width of one font row in bytes */
+ uint32_t width : 6; /* Width of the font in bits */
+ uint32_t height : 6; /* Height of the font in rows */
+ uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */
+ uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */
uint32_t unused : 6;
};
@@ -70,7 +87,7 @@ struct nx_fontmetric_s
struct nx_fontbitmap_s
{
struct nx_fontmetric_s metric; /* Character metrics */
- FAR const uint8_t *bitmap; /* Pointer to the character bitmap */
+ FAR const uint8_t *bitmap; /* Pointer to the character bitmap */
};
/* This structure describes one contiguous grouping of glyphs that
@@ -80,19 +97,31 @@ struct nx_fontbitmap_s
struct nx_fontset_s
{
- uint8_t first; /* First bitmap character code */
- uint8_t nchars; /* Number of bitmap character codes */
+ uint8_t first; /* First bitmap character code */
+ uint8_t nchars; /* Number of bitmap character codes */
FAR const struct nx_fontbitmap_s *bitmap;
};
-/* This structure describes the overall fontset */
+/* This structure describes the overall metrics of the fontset */
struct nx_font_s
{
- uint8_t mxheight; /* Max height of one glyph in rows */
- uint8_t mxwidth; /* Max width of any glyph in pixels */
- uint8_t mxbits; /* Max number of bits per character code */
- uint8_t spwidth; /* The width of a space in pixels */
+ uint8_t mxheight; /* Max height of one glyph in rows */
+ uint8_t mxwidth; /* Max width of any glyph in pixels */
+ uint8_t mxbits; /* Max number of bits per character code */
+ uint8_t spwidth; /* The width of a space in pixels */
+};
+
+/* Finally, this structure defines everything about the font set */
+
+struct nx_fontpackage_s
+{
+ uint8_t id; /* The font ID */
+ struct nx_font_s metrics; /* Font set metrics */
+ struct nx_fontset_s font7; /* Fonts for 7-bit encoding */
+#if CONFIG_NXFONTS_CHARBITS >= 8
+ struct nx_fontset_s font8; /* Fonts for 8-bit encoding */
+#endif
};
/****************************************************************************
@@ -118,11 +147,11 @@ extern "C" {
* Return information about the current font set
*
* Input Parameters:
- * An instance of struct nx_font_s describing the font set.
+ * fontid: Identifies the font set to get
*
****************************************************************************/
-EXTERN FAR const struct nx_font_s *nxf_getfontset(void);
+EXTERN FAR const struct nx_font_s *nxf_getfontset(enum nx_fontid_e fontid);
/****************************************************************************
* Name: nxf_getbitmap
@@ -131,14 +160,16 @@ EXTERN FAR const struct nx_font_s *nxf_getfontset(void);
* Return font bitmap information for the selected character encoding.
*
* Input Parameters:
- * ch - character code
+ * ch: Character code
+ * fontid: Identifies the font set to use
*
* Returned Value:
* An instance of struct nx_fontbitmap_s describing the glyph.
*
****************************************************************************/
-EXTERN FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch);
+EXTERN FAR const struct nx_fontbitmap_s *
+ nxf_getbitmap(uint16_t ch, enum nx_fontid_e fontid);
/****************************************************************************
* Name: nxf_convert_*bpp
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 8256c2d8c8..3fc318a402 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -105,7 +105,7 @@ enum tstate_e
TSTATE_WAIT_MQNOTFULL, /* BLOCKED - Waiting for a MQ to become not full. */
#endif
#ifdef CONFIG_PAGING
- TSTATE_WAIT_PAGEFILL, /* BLOCKED - Waiting for page fill */
+ TSTATE_WAIT_PAGEFILL, /* BLOCKED - Waiting for page fill */
#endif
NUM_TASK_STATES /* Must be last */
};
diff --git a/nuttx/sched/sem_timedwait.c b/nuttx/sched/sem_timedwait.c
index c02bc48db5..7b01d22d81 100644
--- a/nuttx/sched/sem_timedwait.c
+++ b/nuttx/sched/sem_timedwait.c
@@ -271,7 +271,9 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
wd_delete(wdog);
/* We are either returning success or an error detected by sem_wait()
- * or the timeout detected by sem_timeout().
+ * or the timeout detected by sem_timeout(). The 'errno' value has
+ * been set appropriately by sem_wait() or sem_timeout() in those
+ * cases.
*/
return ret;