diff options
Diffstat (limited to 'nuttx/graphics/nxmu')
-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 |
3 files changed, 14 insertions, 14 deletions
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; |