9
0
Fork 0

Fixes from last changes when built with CodeSourcery, STM32, LCD, 16-bit color

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4063 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-10-25 01:02:49 +00:00
parent dd475b2a41
commit 4b6de6f9c1
31 changed files with 93 additions and 73 deletions

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/RIDE/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/RIDE/defconfig
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -237,6 +237,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -325,6 +326,7 @@ CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_DEBUG_SCHED=y
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/buttons/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/buttons/defconfig
#
# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -251,6 +251,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -338,6 +339,7 @@ CONFIG_HAVE_LIBM=n
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nsh/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nsh/defconfig
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -334,6 +335,7 @@ CONFIG_HAVE_LIBM=n
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nsh2/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nsh2/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -336,6 +337,7 @@ CONFIG_DEBUG_GRAPHICS=n
CONFIG_DEBUG_LCD=n
CONFIG_DEBUG_USB=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nx/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nx/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -333,6 +334,7 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_GRAPHICS=n
CONFIG_DEBUG_LCD=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nxlines/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -112,7 +112,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nxlines/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -333,6 +334,7 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_GRAPHICS=n
CONFIG_DEBUG_LCD=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nxtext/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -112,7 +112,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/nxtext/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -333,6 +334,7 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_GRAPHICS=n
CONFIG_DEBUG_LCD=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/ostest/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/ostest/defconfig
#
# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -249,6 +249,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -336,6 +337,7 @@ CONFIG_HAVE_LIBM=n
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/usbserial/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/usbserial/defconfig
#
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -249,6 +249,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -337,6 +338,7 @@ CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_USB=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/usbstorage/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -110,7 +110,7 @@ else
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =

View File

@ -2,7 +2,7 @@
# configs/stm3210e-eval/usbstorage/defconfig
#
# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -247,6 +247,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++S
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
@ -333,6 +334,7 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_FS=n
CONFIG_DEBUG_USB=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_HAVE_CXX=n
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200

View File

@ -90,7 +90,7 @@ struct nxbe_plane_s
void (*fillrectangle)(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
nxgl_mxpixel_t color);
void (*getrectangle)(FAR struct fb_planeinfo_s *pinfo,
void (*getrectangle)(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
void (*filltrapezoid)(FAR NX_PLANEINFOTYPE *pinfo,

View File

@ -39,6 +39,9 @@
#include <nuttx/config.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/nx/nxglib.h>
#include "nxbe.h"
@ -103,6 +106,7 @@ void nxbe_getrectangle(FAR struct nxbe_window_s *wnd,
#ifdef CONFIG_DEBUG
if (!wnd || !rect || ! rect || plane >= wnd->be->vinfo.nplanes)
{
gvdbg("Invalid parameters\n");
return;
}
#endif

View File

@ -80,7 +80,7 @@
****************************************************************************/
void NXGL_FUNCNAME(nxgl_getrectangle,NXGLIB_SUFFIX)
(FAR struct fb_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect,
(FAR struct lcd_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride)
{
FAR uint8_t *dline;

View File

@ -92,9 +92,9 @@
*
****************************************************************************/
void nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
struct nxsvrmsg_getrectangle_s outmsg;
@ -103,15 +103,8 @@ void nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
#ifdef CONFIG_DEBUG
if (!hwnd || !rect || !dest)
{
errno = EINVAL;
return ERROR;
}
#endif
#ifdef CONFIG_DEBUG
if (!wnd || !wnd->conn || !rect || !color)
{
errno = EINVAL;
gvdbg("Invalid parameters\n");
set_errno(EINVAL);
return ERROR;
}
#endif

View File

@ -92,17 +92,19 @@
*
****************************************************************************/
void nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
#ifdef CONFIG_DEBUG
if (!hwnd || !rect || !dest)
{
errno = EINVAL;
set_errno(EINVAL);
return ERROR;
}
#endif
return nxbe_getrectangle((FAR struct nxbe_window_s *)hwnd, rect, plane, dest, deststride);
nxbe_getrectangle((FAR struct nxbe_window_s *)hwnd, rect, plane,
dest, deststride);
return OK;
}

View File

@ -94,7 +94,7 @@
*
****************************************************************************/
void nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
int nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
@ -105,8 +105,8 @@ void nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
if (!hfwnd || !rect || !dest)
{
gvdbg("Invalid parameters\n");
errno = EINVAL;
return;
set_errno(EINVAL);
return ERROR;
}
#endif

View File

@ -94,9 +94,9 @@
*
****************************************************************************/
void nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
int nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
struct nxgl_rect_s getrect;
@ -105,7 +105,8 @@ void nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
if (!hfwnd || !rect || !dest)
{
gvdbg("Invalid parameters\n");
return;
set_errno(EINVAL);
return ERROR;
}
#endif

View File

@ -639,9 +639,9 @@ EXTERN int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
*
****************************************************************************/
EXTERN void nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
EXTERN int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
/****************************************************************************
* Name: nx_filltrapezoid

View File

@ -289,25 +289,25 @@ EXTERN void nxgl_fillrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
*
****************************************************************************/
EXTERN void nxgl_getrectangle_1bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_1bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_2bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_2bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_4bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_4bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_8bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_8bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_16bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_16bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_24bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_24bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);
EXTERN void nxgl_getrectangle_32bpp(FAR struct fb_planeinfo_s *pinfo,
EXTERN void nxgl_getrectangle_32bpp(FAR NX_PLANEINFOTYPE *pinfo,
FAR const struct nxgl_rect_s *rect,
FAR void *dest, unsigned int deststride);

View File

@ -241,9 +241,9 @@ EXTERN int nxtk_fillwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
*
****************************************************************************/
EXTERN void nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
EXTERN int nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
/****************************************************************************
* Name: nxtk_filltrapwindow
@ -462,9 +462,9 @@ EXTERN int nxtk_filltoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect
*
****************************************************************************/
EXTERN void nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
EXTERN int nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,
unsigned int plane, FAR uint8_t *dest,
unsigned int deststride);
/****************************************************************************
* Name: nxtk_filltraptoolbar

View File

@ -59,7 +59,7 @@
/* This macro creates RGB16 (5:6:5) from 8:8:8 RGB */
#define RGBTO16(r,g,b) \
((((uint16_t)(r) << 11) & 0xf800) | (((uint16_t)(r) << 5) & 0x07e0) | ((uint16_t)(r) & 0x001f))
((((uint16_t)(r) << 11) & 0xf800) | (((uint16_t)(g) << 5) & 0x07e0) | ((uint16_t)(b) & 0x001f))
/* And these macros perform the inverse transformation */