From 9a624926254d50891f34399e245038c467233367 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 10 Dec 2013 09:29:20 -0600 Subject: Move rgbcolors.h to include/nuttx/video --- NxWidgets/libnxwidgets/include/cscaledbitmap.hxx | 2 +- NxWidgets/libnxwidgets/include/nxconfig.hxx | 2 +- NxWidgets/libnxwidgets/src/cgraphicsport.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_arrowdown.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_arrowleft.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_arrowright.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_arrowup.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_backspace.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_capslock.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_checkboxmu.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_checkboxon.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_control.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_cycle.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_nxlogo160x160.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_nxlogo320x320.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_radiobuttonmu.cxx | 2 +- .../libnxwidgets/src/glyph_radiobuttonoff.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_radiobuttonon.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_return.cxx | 2 +- .../libnxwidgets/src/glyph_screendepthdown.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_screendepthup.cxx | 2 +- .../libnxwidgets/src/glyph_screenflipdown.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_screenflipup.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_shift.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_windowclose.cxx | 2 +- .../libnxwidgets/src/glyph_windowdepthdown.cxx | 2 +- NxWidgets/libnxwidgets/src/glyph_windowdepthup.cxx | 2 +- NxWidgets/nxwm/src/glyph_calculator.cxx | 2 +- NxWidgets/nxwm/src/glyph_calibration.cxx | 2 +- NxWidgets/nxwm/src/glyph_cmd.cxx | 2 +- NxWidgets/nxwm/src/glyph_mediaplayer.cxx | 2 +- NxWidgets/nxwm/src/glyph_minimize.cxx | 2 +- NxWidgets/nxwm/src/glyph_mplayer_controls.cxx | 2 +- NxWidgets/nxwm/src/glyph_nsh.cxx | 2 +- NxWidgets/nxwm/src/glyph_play24x24.cxx | 2 +- NxWidgets/nxwm/src/glyph_start.cxx | 2 +- NxWidgets/nxwm/src/glyph_stop.cxx | 2 +- apps/examples/nxconsole/nxcon_internal.h | 2 +- apps/examples/nxlines/nxlines.h | 2 +- nuttx/ChangeLog | 6 +- nuttx/configs/sam3u-ek/src/up_lcd.c | 2 +- nuttx/include/nuttx/rgbcolors.h | 316 --------------------- nuttx/include/nuttx/video/rgbcolors.h | 316 +++++++++++++++++++++ 43 files changed, 360 insertions(+), 358 deletions(-) delete mode 100644 nuttx/include/nuttx/rgbcolors.h create mode 100644 nuttx/include/nuttx/video/rgbcolors.h diff --git a/NxWidgets/libnxwidgets/include/cscaledbitmap.hxx b/NxWidgets/libnxwidgets/include/cscaledbitmap.hxx index 3c0594a1d..48afd5306 100644 --- a/NxWidgets/libnxwidgets/include/cscaledbitmap.hxx +++ b/NxWidgets/libnxwidgets/include/cscaledbitmap.hxx @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include "nxconfig.hxx" diff --git a/NxWidgets/libnxwidgets/include/nxconfig.hxx b/NxWidgets/libnxwidgets/include/nxconfig.hxx index cd51229c2..1336ad5e7 100644 --- a/NxWidgets/libnxwidgets/include/nxconfig.hxx +++ b/NxWidgets/libnxwidgets/include/nxconfig.hxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include /**************************************************************************** diff --git a/NxWidgets/libnxwidgets/src/cgraphicsport.cxx b/NxWidgets/libnxwidgets/src/cgraphicsport.cxx index f295483a9..85548a381 100644 --- a/NxWidgets/libnxwidgets/src/cgraphicsport.cxx +++ b/NxWidgets/libnxwidgets/src/cgraphicsport.cxx @@ -80,7 +80,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "inxwindow.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_arrowdown.cxx b/NxWidgets/libnxwidgets/src/glyph_arrowdown.cxx index acff11f6a..c304e9281 100644 --- a/NxWidgets/libnxwidgets/src/glyph_arrowdown.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_arrowdown.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_arrowleft.cxx b/NxWidgets/libnxwidgets/src/glyph_arrowleft.cxx index 5a00ecca9..ae322dcc2 100644 --- a/NxWidgets/libnxwidgets/src/glyph_arrowleft.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_arrowleft.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_arrowright.cxx b/NxWidgets/libnxwidgets/src/glyph_arrowright.cxx index e80966ab7..5969527d9 100644 --- a/NxWidgets/libnxwidgets/src/glyph_arrowright.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_arrowright.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_arrowup.cxx b/NxWidgets/libnxwidgets/src/glyph_arrowup.cxx index ee9add5b2..9ea10bde2 100644 --- a/NxWidgets/libnxwidgets/src/glyph_arrowup.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_arrowup.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_backspace.cxx b/NxWidgets/libnxwidgets/src/glyph_backspace.cxx index e7cabef29..86c1fb93a 100644 --- a/NxWidgets/libnxwidgets/src/glyph_backspace.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_backspace.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_capslock.cxx b/NxWidgets/libnxwidgets/src/glyph_capslock.cxx index 29281e9df..d9e00bc78 100644 --- a/NxWidgets/libnxwidgets/src/glyph_capslock.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_capslock.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_checkboxmu.cxx b/NxWidgets/libnxwidgets/src/glyph_checkboxmu.cxx index 1068b7e45..96dbec9c1 100644 --- a/NxWidgets/libnxwidgets/src/glyph_checkboxmu.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_checkboxmu.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_checkboxon.cxx b/NxWidgets/libnxwidgets/src/glyph_checkboxon.cxx index bbf37ddcd..b598e60ce 100644 --- a/NxWidgets/libnxwidgets/src/glyph_checkboxon.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_checkboxon.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_control.cxx b/NxWidgets/libnxwidgets/src/glyph_control.cxx index 028a7197c..cd2e373e6 100644 --- a/NxWidgets/libnxwidgets/src/glyph_control.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_control.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_cycle.cxx b/NxWidgets/libnxwidgets/src/glyph_cycle.cxx index 4b0adac84..7983d4566 100644 --- a/NxWidgets/libnxwidgets/src/glyph_cycle.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_cycle.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_nxlogo160x160.cxx b/NxWidgets/libnxwidgets/src/glyph_nxlogo160x160.cxx index e4f043936..6a38b45cb 100644 --- a/NxWidgets/libnxwidgets/src/glyph_nxlogo160x160.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_nxlogo160x160.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_nxlogo320x320.cxx b/NxWidgets/libnxwidgets/src/glyph_nxlogo320x320.cxx index 68c081a28..c83ab7159 100644 --- a/NxWidgets/libnxwidgets/src/glyph_nxlogo320x320.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_nxlogo320x320.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_radiobuttonmu.cxx b/NxWidgets/libnxwidgets/src/glyph_radiobuttonmu.cxx index 58888194d..1359c5b96 100644 --- a/NxWidgets/libnxwidgets/src/glyph_radiobuttonmu.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_radiobuttonmu.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_radiobuttonoff.cxx b/NxWidgets/libnxwidgets/src/glyph_radiobuttonoff.cxx index 4fc90a333..422db01a9 100644 --- a/NxWidgets/libnxwidgets/src/glyph_radiobuttonoff.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_radiobuttonoff.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_radiobuttonon.cxx b/NxWidgets/libnxwidgets/src/glyph_radiobuttonon.cxx index b634af053..04ca63757 100644 --- a/NxWidgets/libnxwidgets/src/glyph_radiobuttonon.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_radiobuttonon.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_return.cxx b/NxWidgets/libnxwidgets/src/glyph_return.cxx index 7a8eba024..3989ff89a 100644 --- a/NxWidgets/libnxwidgets/src/glyph_return.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_return.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_screendepthdown.cxx b/NxWidgets/libnxwidgets/src/glyph_screendepthdown.cxx index 495c68cda..e55e0686a 100644 --- a/NxWidgets/libnxwidgets/src/glyph_screendepthdown.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_screendepthdown.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_screendepthup.cxx b/NxWidgets/libnxwidgets/src/glyph_screendepthup.cxx index b5c389f9c..e693b7488 100644 --- a/NxWidgets/libnxwidgets/src/glyph_screendepthup.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_screendepthup.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_screenflipdown.cxx b/NxWidgets/libnxwidgets/src/glyph_screenflipdown.cxx index d775d0e50..488315d7a 100644 --- a/NxWidgets/libnxwidgets/src/glyph_screenflipdown.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_screenflipdown.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_screenflipup.cxx b/NxWidgets/libnxwidgets/src/glyph_screenflipup.cxx index 7f412345f..7d45dbf93 100644 --- a/NxWidgets/libnxwidgets/src/glyph_screenflipup.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_screenflipup.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_shift.cxx b/NxWidgets/libnxwidgets/src/glyph_shift.cxx index 48515b13c..c1cce8686 100644 --- a/NxWidgets/libnxwidgets/src/glyph_shift.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_shift.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_windowclose.cxx b/NxWidgets/libnxwidgets/src/glyph_windowclose.cxx index 0600d2537..62d6ee718 100644 --- a/NxWidgets/libnxwidgets/src/glyph_windowclose.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_windowclose.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_windowdepthdown.cxx b/NxWidgets/libnxwidgets/src/glyph_windowdepthdown.cxx index 195002630..b85ed053a 100644 --- a/NxWidgets/libnxwidgets/src/glyph_windowdepthdown.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_windowdepthdown.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/libnxwidgets/src/glyph_windowdepthup.cxx b/NxWidgets/libnxwidgets/src/glyph_windowdepthup.cxx index b182a861c..056e27c1c 100644 --- a/NxWidgets/libnxwidgets/src/glyph_windowdepthup.cxx +++ b/NxWidgets/libnxwidgets/src/glyph_windowdepthup.cxx @@ -79,7 +79,7 @@ #include #include -#include +#include #include "nxconfig.hxx" #include "cbitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_calculator.cxx b/NxWidgets/nxwm/src/glyph_calculator.cxx index e10bce74f..9bb3f690d 100644 --- a/NxWidgets/nxwm/src/glyph_calculator.cxx +++ b/NxWidgets/nxwm/src/glyph_calculator.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_calibration.cxx b/NxWidgets/nxwm/src/glyph_calibration.cxx index be9d8de0a..df169f556 100644 --- a/NxWidgets/nxwm/src/glyph_calibration.cxx +++ b/NxWidgets/nxwm/src/glyph_calibration.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_cmd.cxx b/NxWidgets/nxwm/src/glyph_cmd.cxx index a424fe6f3..373d8ad5e 100644 --- a/NxWidgets/nxwm/src/glyph_cmd.cxx +++ b/NxWidgets/nxwm/src/glyph_cmd.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_mediaplayer.cxx b/NxWidgets/nxwm/src/glyph_mediaplayer.cxx index 77e933915..ee8c1a873 100644 --- a/NxWidgets/nxwm/src/glyph_mediaplayer.cxx +++ b/NxWidgets/nxwm/src/glyph_mediaplayer.cxx @@ -48,7 +48,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_minimize.cxx b/NxWidgets/nxwm/src/glyph_minimize.cxx index 0c45a2f77..31feb268f 100644 --- a/NxWidgets/nxwm/src/glyph_minimize.cxx +++ b/NxWidgets/nxwm/src/glyph_minimize.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx b/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx index 505d87733..011f892a2 100644 --- a/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx +++ b/NxWidgets/nxwm/src/glyph_mplayer_controls.cxx @@ -48,7 +48,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_nsh.cxx b/NxWidgets/nxwm/src/glyph_nsh.cxx index 5fa464854..213db54dd 100644 --- a/NxWidgets/nxwm/src/glyph_nsh.cxx +++ b/NxWidgets/nxwm/src/glyph_nsh.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_play24x24.cxx b/NxWidgets/nxwm/src/glyph_play24x24.cxx index e16e3b505..ffe389fc5 100644 --- a/NxWidgets/nxwm/src/glyph_play24x24.cxx +++ b/NxWidgets/nxwm/src/glyph_play24x24.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_start.cxx b/NxWidgets/nxwm/src/glyph_start.cxx index db2ffaf94..ce1bf6a2c 100644 --- a/NxWidgets/nxwm/src/glyph_start.cxx +++ b/NxWidgets/nxwm/src/glyph_start.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/NxWidgets/nxwm/src/glyph_stop.cxx b/NxWidgets/nxwm/src/glyph_stop.cxx index df7e02268..74836e01d 100644 --- a/NxWidgets/nxwm/src/glyph_stop.cxx +++ b/NxWidgets/nxwm/src/glyph_stop.cxx @@ -45,7 +45,7 @@ #include #include -#include +#include #include "crlepalettebitmap.hxx" diff --git a/apps/examples/nxconsole/nxcon_internal.h b/apps/examples/nxconsole/nxcon_internal.h index c921bed38..02d84d025 100644 --- a/apps/examples/nxconsole/nxcon_internal.h +++ b/apps/examples/nxconsole/nxcon_internal.h @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include diff --git a/apps/examples/nxlines/nxlines.h b/apps/examples/nxlines/nxlines.h index c9101124e..19e809c8b 100644 --- a/apps/examples/nxlines/nxlines.h +++ b/apps/examples/nxlines/nxlines.h @@ -48,7 +48,7 @@ #include #include -#include +#include /**************************************************************************** * Definitions diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c6c3819a4..9928ba3e5 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2172,7 +2172,7 @@ interfaces to read from graphics memory * graphics/nxbe/nxbe_bitmap.c: Fix an error in the error handling that can cause valid bitmaps to fail to render. - * include/nuttx/rgbcolors.h: Fix errors in some 16- and 8-bit color + * include/nuttx/video/rgbcolors.h: Fix errors in some 16- and 8-bit color conversion macros. * tools/incdir.sh: Fix issues when g++ is used as the compiler. It was not being recognized and handled properly. @@ -2192,7 +2192,7 @@ supports using "clusters" of AT24 pages as blocks. This allows bigger block sizes and more efficient use of EEPROM when the AT24 is used to support a file system (such as NXFFS). (Contributed by Hal Glenn). - * include/nuttx/rgbcolors.h: More fixes to RGB color conversion + * include/nuttx/video/rgbcolors.h: More fixes to RGB color conversion macros. * arch/arm/src/common/up_createstack.c and up_usestack.c: For ARM EABI the stack must be aligned to 8-byte boundaries. This is necessary for @@ -6187,4 +6187,6 @@ header file (2013-12-9). * include/nuttx/video/fb.h: Move fb.h to include/nuttx/video/ (2013-12-10). + * include/nuttx/video/rgbcolors.h: Move rgbcolors.h to include/nuttx/video. + (2013-12-10). diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c index 6cfb08720..780abe049 100644 --- a/nuttx/configs/sam3u-ek/src/up_lcd.c +++ b/nuttx/configs/sam3u-ek/src/up_lcd.c @@ -119,7 +119,7 @@ #include #include -#include +#include #include diff --git a/nuttx/include/nuttx/rgbcolors.h b/nuttx/include/nuttx/rgbcolors.h deleted file mode 100644 index b4b8826d4..000000000 --- a/nuttx/include/nuttx/rgbcolors.h +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** - * include/nuttx/rgbcolors.h - * User-friendly RGB color definitions - * - * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -#ifndef __INCLUDE_NUTTX_RGBCOLOR_H -#define __INCLUDE_NUTTX_RGBCOLOR_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ -/* Color Creation and Conversion Macros *************************************/ -/* This macro creates RGB24 from 8:8:8 RGB */ - -#define RGBTO24(r,g,b) \ - ((uint32_t)((r) & 0xff) << 16 | (uint32_t)((g) & 0xff) << 8 | (uint32_t)((b) & 0xff)) - -/* And these macros perform the inverse transformation */ - -#define RBG24RED(rgb) (((rgb) >> 16) & 0xff) -#define RBG24GREEN(rgb) (((rgb) >> 8) & 0xff) -#define RBG24BLUE(rgb) ( (rgb) & 0xff) - -/* This macro creates RGB16 (5:6:5) from 8:8:8 RGB: - * - * R[7:3] -> RGB[15:11] - * G[7:2] -> RGB[10:5] - * B[7:3] -> RGB[4:0] - */ - -#define RGBTO16(r,g,b) \ - ((((uint16_t)(r) << 8) & 0xf800) | (((uint16_t)(g) << 3) & 0x07e0) | (((uint16_t)(b) >> 3) & 0x001f)) - -/* And these macros perform the inverse transformation */ - -#define RBG16RED(rgb) (((rgb) >> 8) & 0xf8) -#define RBG16GREEN(rgb) (((rgb) >> 3) & 0xfc) -#define RBG16BLUE(rgb) (((rgb) << 3) & 0xf8) - -/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */ - -#define RGBTO8(r,g,b) \ - ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03)) - -/* And these macros perform the inverse transformation */ - -#define RBG8RED(rgb) ( (rgb) & 0xe0) -#define RBG8GREEN(rgb) (((rgb) << 3) & 0xe0) -#define RBG8BLUE(rgb) (((rgb) << 6) & 0xc0) - -/* This macro converts RGB24 (8:8:8) to RGB16 (5:6:5): - * - * 00000000 RRRRRRRR BBBBBBBB GGGGGGGG -> RRRRRBBB BBBGGGGG - */ - -#define RGB24TO16(rgb24) \ - (((rgb24 >> 8) & 0xf800) | ((rgb24 >> 5) & 0x07e0) | ((rgb24 >> 3) & 0x001f)) - -/* This macro converts RGB16 (5:6:5) to RGB24 (8:8:8): - * - * RRRRRBBB BBBGGGGG -> 00000000 RRRRRRRR BBBBBBBB GGGGGGGG - */ - -#define RGB16TO24(rgb16) \ - (((rgb16 & 0xf800) << 8) | ((rgb16 & 0x07e0) << 5) | ((rgb16 & 0x001f) << 3)) - -/* Standard Color Definitions ***********************************************/ -/* RGB24-888: 00000000 RRRRRRRR GGGGGGGG BBBBBBBB */ - -#define RGB24_BLACK 0x00000000 -#define RGB24_WHITE 0x00ffffff - -#define RGB24_BLUE 0x000000ff -#define RGB24_GREEN 0x0000ff00 -#define RGB24_RED 0x00ff0000 - -#define RGB24_NAVY 0x00000080 -#define RGB24_DARKBLUE 0x0000008b -#define RGB24_DARKGREEN 0x00006400 -#define RGB24_DARKCYAN 0x00008b8b -#define RGB24_CYAN 0x0000ffff -#define RGB24_TURQUOISE 0x0040e0d0 -#define RGB24_INDIGO 0x004b0082 -#define RGB24_DARKRED 0x00800000 -#define RGB24_OLIVE 0x00808000 -#define RGB24_GRAY 0x00808080 -#define RGB24_SKYBLUE 0x0087ceeb -#define RGB24_BLUEVIOLET 0x008a2be2 -#define RGB24_LIGHTGREEN 0x0090ee90 -#define RGB24_DARKVIOLET 0x009400d3 -#define RGB24_YELLOWGREEN 0x009acd32 -#define RGB24_BROWN 0x00a52a2a -#define RGB24_DARKGRAY 0x00a9a9a9 -#define RGB24_SIENNA 0x00a0522d -#define RGB24_LIGHTBLUE 0x00add8e6 -#define RGB24_GREENYELLOW 0x00adff2f -#define RGB24_SILVER 0x00c0c0c0 -#define RGB24_LIGHTGREY 0x00d3d3d3 -#define RGB24_LIGHTCYAN 0x00e0ffff -#define RGB24_VIOLET 0x00ee82ee -#define RGB24_AZUR 0x00f0ffff -#define RGB24_BEIGE 0x00f5f5dc -#define RGB24_MAGENTA 0x00ff00ff -#define RGB24_TOMATO 0x00ff6347 -#define RGB24_GOLD 0x00ffd700 -#define RGB24_ORANGE 0x00ffa500 -#define RGB24_SNOW 0x00fffafa -#define RGB24_YELLOW 0x00ffff00 - -/* RGB16-565: RRRRRGGG GGGBBBBB */ - -#define RGB16_BLACK 0x0000 -#define RGB16_WHITE 0xffff - -#define RGB16_BLUE 0x001f -#define RGB16_GREEN 0x07e0 -#define RGB16_RED 0xf800 - -#define RGB16_NAVY 0x0010 -#define RGB16_DARKBLUE 0x0011 -#define RGB16_DARKGREEN 0x0320 -#define RGB16_DARKCYAN 0x0451 -#define RGB16_CYAN 0x07ff -#define RGB16_TURQUOISE 0x471a -#define RGB16_INDIGO 0x4810 -#define RGB16_DARKRED 0x8000 -#define RGB16_OLIVE 0x8400 -#define RGB16_GRAY 0x8410 -#define RGB16_SKYBLUE 0x867d -#define RGB16_BLUEVIOLET 0x895c -#define RGB16_LIGHTGREEN 0x9772 -#define RGB16_DARKVIOLET 0x901a -#define RGB16_YELLOWGREEN 0x9e66 -#define RGB16_BROWN 0xa145 -#define RGB16_DARKGRAY 0xad55 -#define RGB16_SIENNA 0xa285 -#define RGB16_LIGHTBLUE 0xaedc -#define RGB16_GREENYELLOW 0xafe5 -#define RGB16_SILVER 0xc618 -#define RGB16_LIGHTGREY 0xd69a -#define RGB16_LIGHTCYAN 0xe7ff -#define RGB16_VIOLET 0xec1d -#define RGB16_AZUR 0xf7ff -#define RGB16_BEIGE 0xf7bb -#define RGB16_MAGENTA 0xf81f -#define RGB16_TOMATO 0xfb08 -#define RGB16_GOLD 0xfea0 -#define RGB16_ORANGE 0xfd20 -#define RGB16_SNOW 0xffdf -#define RGB16_YELLOW 0xffe0 - -/* RGB12-444: RRRR GGGGBBBB */ - -#define RGB12_BLACK 0x0000 -#define RGB12_WHITE 0x0fff - -#define RGB12_BLUE 0x000f -#define RGB12_GREEN 0x00f0 -#define RGB12_RED 0x0f00 - -#define RGB12_NAVY 0x0008 -#define RGB12_DARKBLUE 0x0009 -#define RGB12_DARKGREEN 0x0060 -#define RGB12_DARKCYAN 0x0099 -#define RGB12_CYAN 0x00ff -#define RGB12_TURQUOISE 0x04ed -#define RGB12_INDIGO 0x0508 -#define RGB12_DARKRED 0x0800 -#define RGB12_OLIVE 0x0880 -#define RGB12_GRAY 0x0888 -#define RGB12_SKYBLUE 0x08df -#define RGB12_BLUEVIOLET 0x093e -#define RGB12_LIGHTGREEN 0x09f9 -#define RGB12_DARKVIOLET 0x090d -#define RGB12_YELLOWGREEN 0x0ad3 -#define RGB12_BROWN 0x0a33 -#define RGB12_DARKGRAY 0x0bbb -#define RGB12_SIENNA 0x0a53 -#define RGB12_LIGHTBLUE 0x0bee -#define RGB12_GREENYELLOW 0x0bf3 -#define RGB12_SILVER 0x0ccc -#define RGB12_LIGHTGREY 0x0ddd -#define RGB12_LIGHTCYAN 0x0eff -#define RGB12_VIOLET 0x0f8f -#define RGB12_AZUR 0x0fff -#define RGB12_BEIGE 0x0ffe -#define RGB12_MAGENTA 0x0f0f -#define RGB12_TOMATO 0x0f64 -#define RGB12_GOLD 0x0fd0 -#define RGB12_ORANGE 0x0fa0 -#define RGB12_SNOW 0x0fff -#define RGB12_YELLOW 0x0ff0 - -/* RGB8-332: RRRGGGBB (really not enough color resolution for the following) */ - -#define RGB8_BLACK 0x00 -#define RGB8_WHITE 0xff - -#define RGB8_BLUE 0x03 -#define RGB8_GREEN 0x1c -#define RGB8_RED 0xe0 -#define RGB8_NAVY 0x02 -#define RGB8_DARKBLUE 0x02 -#define RGB8_DARKGREEN 0x0c -#define RGB8_DARKCYAN 0x16 -#define RGB8_CYAN 0x1f -#define RGB8_TURQUOISE 0x5f -#define RGB8_INDIGO 0x62 -#define RGB8_DARKRED 0x80 -#define RGB8_OLIVE 0x90 -#define RGB8_GRAY 0x92 -#define RGB8_SKYBLUE 0x9f -#define RGB8_BLUEVIOLET 0xab -#define RGB8_LIGHTGREEN 0xbe -#define RGB8_DARKVIOLET 0x93 -#define RGB8_YELLOWGREEN 0x9d -#define RGB8_BROWN 0xa9 -#define RGB8_DARKGRAY 0xdb -#define RGB8_SIENNA 0xa9 -#define RGB8_LIGHTBLUE 0xdf -#define RGB8_GREENYELLOW 0xdd -#define RGB8_SILVER 0xd9 -#define RGB8_LIGHTGREY 0xd9 -#define RGB8_LIGHTCYAN 0xff -#define RGB8_VIOLET 0xf3 -#define RGB8_AZUR 0xff -#define RGB8_BEIGE 0xff -#define RGB8_MAGENTA 0xed -#define RGB8_TOMATO 0xfc -#define RGB8_GOLD 0xfc -#define RGB8_ORANGE 0xf8 -#define RGB8_SNOW 0xff -#define RGB8_YELLOW 0xfc - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -/* This is a generic representation of an RGB color */ - -struct rgbcolor_s -{ - uint8_t r; /* Red value */ - uint8_t b; /* Blue value */ - uint8_t g; /* Green value */ -}; - -/* This is a generic representation of an RGB color with ALPHA */ - -struct argbcolor_s -{ - uint8_t a; /* Alpha value (transparency) */ - uint8_t r; /* Red value */ - uint8_t b; /* Blue value */ - uint8_t g; /* Green value */ -}; - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifdef __cplusplus -#define EXTERN extern "C" -extern "C" { -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#undef EXTERN -#ifdef __cplusplus -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __INCLUDE_NUTTX_RGBCOLOR_H */ diff --git a/nuttx/include/nuttx/video/rgbcolors.h b/nuttx/include/nuttx/video/rgbcolors.h new file mode 100644 index 000000000..a4a9e4ff6 --- /dev/null +++ b/nuttx/include/nuttx/video/rgbcolors.h @@ -0,0 +1,316 @@ +/**************************************************************************** + * include/nuttx/video/rgbcolors.h + * User-friendly RGB color definitions + * + * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_VIDEO_RGBCOLOR_H +#define __INCLUDE_NUTTX_VIDEO_RGBCOLOR_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Color Creation and Conversion Macros *************************************/ +/* This macro creates RGB24 from 8:8:8 RGB */ + +#define RGBTO24(r,g,b) \ + ((uint32_t)((r) & 0xff) << 16 | (uint32_t)((g) & 0xff) << 8 | (uint32_t)((b) & 0xff)) + +/* And these macros perform the inverse transformation */ + +#define RBG24RED(rgb) (((rgb) >> 16) & 0xff) +#define RBG24GREEN(rgb) (((rgb) >> 8) & 0xff) +#define RBG24BLUE(rgb) ( (rgb) & 0xff) + +/* This macro creates RGB16 (5:6:5) from 8:8:8 RGB: + * + * R[7:3] -> RGB[15:11] + * G[7:2] -> RGB[10:5] + * B[7:3] -> RGB[4:0] + */ + +#define RGBTO16(r,g,b) \ + ((((uint16_t)(r) << 8) & 0xf800) | (((uint16_t)(g) << 3) & 0x07e0) | (((uint16_t)(b) >> 3) & 0x001f)) + +/* And these macros perform the inverse transformation */ + +#define RBG16RED(rgb) (((rgb) >> 8) & 0xf8) +#define RBG16GREEN(rgb) (((rgb) >> 3) & 0xfc) +#define RBG16BLUE(rgb) (((rgb) << 3) & 0xf8) + +/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */ + +#define RGBTO8(r,g,b) \ + ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03)) + +/* And these macros perform the inverse transformation */ + +#define RBG8RED(rgb) ( (rgb) & 0xe0) +#define RBG8GREEN(rgb) (((rgb) << 3) & 0xe0) +#define RBG8BLUE(rgb) (((rgb) << 6) & 0xc0) + +/* This macro converts RGB24 (8:8:8) to RGB16 (5:6:5): + * + * 00000000 RRRRRRRR BBBBBBBB GGGGGGGG -> RRRRRBBB BBBGGGGG + */ + +#define RGB24TO16(rgb24) \ + (((rgb24 >> 8) & 0xf800) | ((rgb24 >> 5) & 0x07e0) | ((rgb24 >> 3) & 0x001f)) + +/* This macro converts RGB16 (5:6:5) to RGB24 (8:8:8): + * + * RRRRRBBB BBBGGGGG -> 00000000 RRRRRRRR BBBBBBBB GGGGGGGG + */ + +#define RGB16TO24(rgb16) \ + (((rgb16 & 0xf800) << 8) | ((rgb16 & 0x07e0) << 5) | ((rgb16 & 0x001f) << 3)) + +/* Standard Color Definitions ***********************************************/ +/* RGB24-888: 00000000 RRRRRRRR GGGGGGGG BBBBBBBB */ + +#define RGB24_BLACK 0x00000000 +#define RGB24_WHITE 0x00ffffff + +#define RGB24_BLUE 0x000000ff +#define RGB24_GREEN 0x0000ff00 +#define RGB24_RED 0x00ff0000 + +#define RGB24_NAVY 0x00000080 +#define RGB24_DARKBLUE 0x0000008b +#define RGB24_DARKGREEN 0x00006400 +#define RGB24_DARKCYAN 0x00008b8b +#define RGB24_CYAN 0x0000ffff +#define RGB24_TURQUOISE 0x0040e0d0 +#define RGB24_INDIGO 0x004b0082 +#define RGB24_DARKRED 0x00800000 +#define RGB24_OLIVE 0x00808000 +#define RGB24_GRAY 0x00808080 +#define RGB24_SKYBLUE 0x0087ceeb +#define RGB24_BLUEVIOLET 0x008a2be2 +#define RGB24_LIGHTGREEN 0x0090ee90 +#define RGB24_DARKVIOLET 0x009400d3 +#define RGB24_YELLOWGREEN 0x009acd32 +#define RGB24_BROWN 0x00a52a2a +#define RGB24_DARKGRAY 0x00a9a9a9 +#define RGB24_SIENNA 0x00a0522d +#define RGB24_LIGHTBLUE 0x00add8e6 +#define RGB24_GREENYELLOW 0x00adff2f +#define RGB24_SILVER 0x00c0c0c0 +#define RGB24_LIGHTGREY 0x00d3d3d3 +#define RGB24_LIGHTCYAN 0x00e0ffff +#define RGB24_VIOLET 0x00ee82ee +#define RGB24_AZUR 0x00f0ffff +#define RGB24_BEIGE 0x00f5f5dc +#define RGB24_MAGENTA 0x00ff00ff +#define RGB24_TOMATO 0x00ff6347 +#define RGB24_GOLD 0x00ffd700 +#define RGB24_ORANGE 0x00ffa500 +#define RGB24_SNOW 0x00fffafa +#define RGB24_YELLOW 0x00ffff00 + +/* RGB16-565: RRRRRGGG GGGBBBBB */ + +#define RGB16_BLACK 0x0000 +#define RGB16_WHITE 0xffff + +#define RGB16_BLUE 0x001f +#define RGB16_GREEN 0x07e0 +#define RGB16_RED 0xf800 + +#define RGB16_NAVY 0x0010 +#define RGB16_DARKBLUE 0x0011 +#define RGB16_DARKGREEN 0x0320 +#define RGB16_DARKCYAN 0x0451 +#define RGB16_CYAN 0x07ff +#define RGB16_TURQUOISE 0x471a +#define RGB16_INDIGO 0x4810 +#define RGB16_DARKRED 0x8000 +#define RGB16_OLIVE 0x8400 +#define RGB16_GRAY 0x8410 +#define RGB16_SKYBLUE 0x867d +#define RGB16_BLUEVIOLET 0x895c +#define RGB16_LIGHTGREEN 0x9772 +#define RGB16_DARKVIOLET 0x901a +#define RGB16_YELLOWGREEN 0x9e66 +#define RGB16_BROWN 0xa145 +#define RGB16_DARKGRAY 0xad55 +#define RGB16_SIENNA 0xa285 +#define RGB16_LIGHTBLUE 0xaedc +#define RGB16_GREENYELLOW 0xafe5 +#define RGB16_SILVER 0xc618 +#define RGB16_LIGHTGREY 0xd69a +#define RGB16_LIGHTCYAN 0xe7ff +#define RGB16_VIOLET 0xec1d +#define RGB16_AZUR 0xf7ff +#define RGB16_BEIGE 0xf7bb +#define RGB16_MAGENTA 0xf81f +#define RGB16_TOMATO 0xfb08 +#define RGB16_GOLD 0xfea0 +#define RGB16_ORANGE 0xfd20 +#define RGB16_SNOW 0xffdf +#define RGB16_YELLOW 0xffe0 + +/* RGB12-444: RRRR GGGGBBBB */ + +#define RGB12_BLACK 0x0000 +#define RGB12_WHITE 0x0fff + +#define RGB12_BLUE 0x000f +#define RGB12_GREEN 0x00f0 +#define RGB12_RED 0x0f00 + +#define RGB12_NAVY 0x0008 +#define RGB12_DARKBLUE 0x0009 +#define RGB12_DARKGREEN 0x0060 +#define RGB12_DARKCYAN 0x0099 +#define RGB12_CYAN 0x00ff +#define RGB12_TURQUOISE 0x04ed +#define RGB12_INDIGO 0x0508 +#define RGB12_DARKRED 0x0800 +#define RGB12_OLIVE 0x0880 +#define RGB12_GRAY 0x0888 +#define RGB12_SKYBLUE 0x08df +#define RGB12_BLUEVIOLET 0x093e +#define RGB12_LIGHTGREEN 0x09f9 +#define RGB12_DARKVIOLET 0x090d +#define RGB12_YELLOWGREEN 0x0ad3 +#define RGB12_BROWN 0x0a33 +#define RGB12_DARKGRAY 0x0bbb +#define RGB12_SIENNA 0x0a53 +#define RGB12_LIGHTBLUE 0x0bee +#define RGB12_GREENYELLOW 0x0bf3 +#define RGB12_SILVER 0x0ccc +#define RGB12_LIGHTGREY 0x0ddd +#define RGB12_LIGHTCYAN 0x0eff +#define RGB12_VIOLET 0x0f8f +#define RGB12_AZUR 0x0fff +#define RGB12_BEIGE 0x0ffe +#define RGB12_MAGENTA 0x0f0f +#define RGB12_TOMATO 0x0f64 +#define RGB12_GOLD 0x0fd0 +#define RGB12_ORANGE 0x0fa0 +#define RGB12_SNOW 0x0fff +#define RGB12_YELLOW 0x0ff0 + +/* RGB8-332: RRRGGGBB (really not enough color resolution for the following) */ + +#define RGB8_BLACK 0x00 +#define RGB8_WHITE 0xff + +#define RGB8_BLUE 0x03 +#define RGB8_GREEN 0x1c +#define RGB8_RED 0xe0 +#define RGB8_NAVY 0x02 +#define RGB8_DARKBLUE 0x02 +#define RGB8_DARKGREEN 0x0c +#define RGB8_DARKCYAN 0x16 +#define RGB8_CYAN 0x1f +#define RGB8_TURQUOISE 0x5f +#define RGB8_INDIGO 0x62 +#define RGB8_DARKRED 0x80 +#define RGB8_OLIVE 0x90 +#define RGB8_GRAY 0x92 +#define RGB8_SKYBLUE 0x9f +#define RGB8_BLUEVIOLET 0xab +#define RGB8_LIGHTGREEN 0xbe +#define RGB8_DARKVIOLET 0x93 +#define RGB8_YELLOWGREEN 0x9d +#define RGB8_BROWN 0xa9 +#define RGB8_DARKGRAY 0xdb +#define RGB8_SIENNA 0xa9 +#define RGB8_LIGHTBLUE 0xdf +#define RGB8_GREENYELLOW 0xdd +#define RGB8_SILVER 0xd9 +#define RGB8_LIGHTGREY 0xd9 +#define RGB8_LIGHTCYAN 0xff +#define RGB8_VIOLET 0xf3 +#define RGB8_AZUR 0xff +#define RGB8_BEIGE 0xff +#define RGB8_MAGENTA 0xed +#define RGB8_TOMATO 0xfc +#define RGB8_GOLD 0xfc +#define RGB8_ORANGE 0xf8 +#define RGB8_SNOW 0xff +#define RGB8_YELLOW 0xfc + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/* This is a generic representation of an RGB color */ + +struct rgbcolor_s +{ + uint8_t r; /* Red value */ + uint8_t b; /* Blue value */ + uint8_t g; /* Green value */ +}; + +/* This is a generic representation of an RGB color with ALPHA */ + +struct argbcolor_s +{ + uint8_t a; /* Alpha value (transparency) */ + uint8_t r; /* Red value */ + uint8_t b; /* Blue value */ + uint8_t g; /* Green value */ +}; + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" { +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __INCLUDE_NUTTX_VIDEO_RGBCOLOR_H */ -- cgit v1.2.3