diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-28 17:19:17 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-28 17:19:17 +0000 |
commit | 9e5d37dcddb921166d203682b52ce5357f9fe5d7 (patch) | |
tree | e12183151cf2f149ff8319895a151c458db3ba01 /nuttx | |
parent | 07e5222a418853f4a9c4eede819afd1da4fa386f (diff) | |
download | px4-firmware-9e5d37dcddb921166d203682b52ce5357f9fe5d7.tar.gz px4-firmware-9e5d37dcddb921166d203682b52ce5357f9fe5d7.tar.bz2 px4-firmware-9e5d37dcddb921166d203682b52ce5357f9fe5d7.zip |
NX console should only be available if NX multi-user mode is enabled
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4535 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/configs/sim/README.txt | 3 | ||||
-rw-r--r-- | nuttx/graphics/nxmu/Make.defs | 6 | ||||
-rw-r--r-- | nuttx/graphics/nxmu/nx_setpixel.c | 11 | ||||
-rw-r--r-- | nuttx/graphics/nxmu/nxmu_server.c | 11 | ||||
-rw-r--r-- | nuttx/include/nuttx/nx/nxconsole.h | 14 |
5 files changed, 30 insertions, 15 deletions
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt index 2a65300d9..58ce7d9ba 100644 --- a/nuttx/configs/sim/README.txt +++ b/nuttx/configs/sim/README.txt @@ -374,6 +374,9 @@ nx11 -CONFIG_NXCONSOLE=n +CONFIG_NXCONSOLE=y + -CONFIG_NX_MULTIUSER=n + +CONFIG_NX_MULTIUSER=y + Comment out the following in the appconfig file: -CONFIGURED_APPS += examples/nx diff --git a/nuttx/graphics/nxmu/Make.defs b/nuttx/graphics/nxmu/Make.defs index 6be702f11..6b4295290 100644 --- a/nuttx/graphics/nxmu/Make.defs +++ b/nuttx/graphics/nxmu/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # graphics/nxmu/Make.defs # -# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -36,10 +36,10 @@ NX_ASRCS = NXAPI_CSRCS = nx_bitmap.c nx_closewindow.c nx_connect.c nx_disconnect.c \ nx_eventhandler.c nx_eventnotify.c nx_fill.c nx_filltrapezoid.c \ - nx_getposition.nx_getrectanble.c nx_kbdchin.c nx_kbdin.c nx_lower.c \ + nx_getposition.c nx_getrectangle.c nx_kbdchin.c nx_kbdin.c nx_lower.c \ nx_mousein.c nx_move.c nx_openwindow.c nx_raise.c \ nx_releasebkgd.c nx_requestbkgd.c nx_setpixel.c nx_setsize.c \ - nx_setbgcolor.c nx_setposition.c nx_drawcircle.c nx_drawline.c + nx_setbgcolor.c nx_setposition.c nx_drawcircle.c nx_drawline.c \ nx_fillcircle.c NXMU_CSRCS = nxmu_constructwindow.c nxmu_kbdin.c nxmu_mouse.c \ nxmu_openwindow.c nxmu_redrawreq.c nxmu_releasebkgd.c \ diff --git a/nuttx/graphics/nxmu/nx_setpixel.c b/nuttx/graphics/nxmu/nx_setpixel.c index f4cc17053..35617646e 100644 --- a/nuttx/graphics/nxmu/nx_setpixel.c +++ b/nuttx/graphics/nxmu/nx_setpixel.c @@ -85,12 +85,12 @@ * col - The color to use in the set * * Return: - * None + * OK on success; ERROR on failure with errno set appropriately * ****************************************************************************/ -void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) +int nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, + nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_setpixel_s outmsg; @@ -99,7 +99,7 @@ void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, #ifdef CONFIG_DEBUG if (!wnd || !wnd->conn || !pos || !color) { - errno = EINVAL; + set_errno(EINVAL); return ERROR; } #endif @@ -108,8 +108,9 @@ void nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, outmsg.msgid = NX_SVRMSG_SETPIXEL; outmsg.wnd = wnd; + outmsg.pos.x = pos->x; + outmsg.pos.y = pos->y; - nxgl_vectcopy(&outmsg.pos, pos); nxgl_colorcopy(outmsg.color, color); /* Forward the fill command to the server */ diff --git a/nuttx/graphics/nxmu/nxmu_server.c b/nuttx/graphics/nxmu/nxmu_server.c index aa545c18f..9cd9e578a 100644 --- a/nuttx/graphics/nxmu/nxmu_server.c +++ b/nuttx/graphics/nxmu/nxmu_server.c @@ -1,7 +1,7 @@ /**************************************************************************** * graphics/nxmu/nxmu_server.c * - * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -180,9 +180,8 @@ static inline void nxmu_shutdown(FAR struct nxfe_state_s *fe) * Name: nxmu_setup ****************************************************************************/ -static inline int nxmu_lcdsetup(FAR const char *mqname, - FAR NX_DRIVERTYPE *dev, - FAR struct nxfe_state_s *fe) +static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, + FAR struct nxfe_state_s *fe) { struct mq_attr attr; int ret; @@ -435,8 +434,8 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) case NX_SVRMSG_SETPIXEL: /* Set a single pixel in the window with a color */ { - FAR struct nxsvrmsg_setpixel_s *setmsg = (FAR struct nxsvrmsg_fill_s *)buffer; - nxbe_setpixel(fillmsg->wnd, &setmsg->pos, setmsg->color); + FAR struct nxsvrmsg_setpixel_s *setmsg = (FAR struct nxsvrmsg_setpixel_s *)buffer; + nxbe_setpixel(setmsg->wnd, &setmsg->pos, setmsg->color); } break; diff --git a/nuttx/include/nuttx/nx/nxconsole.h b/nuttx/include/nuttx/nx/nxconsole.h index bf2c32160..0a66e4c03 100644 --- a/nuttx/include/nuttx/nx/nxconsole.h +++ b/nuttx/include/nuttx/nx/nxconsole.h @@ -51,7 +51,19 @@ * Pre-processor definitions ****************************************************************************/ /* Configuration ************************************************************/ -/* CONFIG_NXCONSOLE +/* Nx Console prerequistes */ + +#ifndef CONFIG_NX +# warning "NX is not enabled (CONFIG_NX) +#endif + +#ifndef CONFIG_NX_MULTIUSER +# warning "NX Console requires multi-user support (CONFIG_NX_MULTIUSER)" +#endif + +/* Nx Console configuration options: + * + * CONFIG_NXCONSOLE * Enables building of the NxConsole driver. * CONFIG_NXCONSOLE_BPP * Currently, NxConsole supports only a single pixel depth. This |