diff options
-rw-r--r-- | NxWidgets/ChangeLog.txt | 3 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/include/nxconfig.hxx | 24 | ||||
-rw-r--r-- | NxWidgets/libnxwidgets/src/cscaledbitmap.cxx | 36 | ||||
-rw-r--r-- | nuttx/ChangeLog | 3 | ||||
-rw-r--r-- | nuttx/include/nuttx/lcd/ili9325.h | 1 | ||||
-rw-r--r-- | nuttx/include/nuttx/video/rgbcolors.h | 18 |
6 files changed, 45 insertions, 40 deletions
diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt index 6f2259867..deff82bde 100644 --- a/NxWidgets/ChangeLog.txt +++ b/NxWidgets/ChangeLog.txt @@ -427,3 +427,6 @@ 1.12 2014-xx-xx Gregory Nutt <gnutt@nuttx.org> +* libnxwidgets/include/nxconfig.hxx and libnxwidgets/src/cscaledbitmap.cxx: + Fix typo RBG -> RGB. This makes NxWidgets incompatible with versions of + NuttX 7.2 and below. diff --git a/NxWidgets/libnxwidgets/include/nxconfig.hxx b/NxWidgets/libnxwidgets/include/nxconfig.hxx index c2141775b..05c6d8422 100644 --- a/NxWidgets/libnxwidgets/include/nxconfig.hxx +++ b/NxWidgets/libnxwidgets/include/nxconfig.hxx @@ -284,9 +284,9 @@ # endif # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB8_332 # define MKRGB RGBTO8 -# define RGB2RED RBG8RED -# define RGB2GREEN RBG8GREEN -# define RGB2BLUE RBG8BLUE +# define RGB2RED RGB8RED +# define RGB2GREEN RGB8GREEN +# define RGB2BLUE RGB8BLUE # define FONT_RENDERER nxf_convert_8bpp #elif CONFIG_NXWIDGETS_BPP == 16 # ifdef CONFIG_NX_DISABLE_16BPP @@ -294,9 +294,9 @@ # endif # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB16_565 # define MKRGB RGBTO16 -# define RGB2RED RBG16RED -# define RGB2GREEN RBG16GREEN -# define RGB2BLUE RBG16BLUE +# define RGB2RED RGB16RED +# define RGB2GREEN RGB16GREEN +# define RGB2BLUE RGB16BLUE # define FONT_RENDERER nxf_convert_16bpp #elif CONFIG_NXWIDGETS_BPP == 24 # ifdef CONFIG_NX_DISABLE_24BPP @@ -304,9 +304,9 @@ # endif # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB24 # define MKRGB RGBTO24 -# define RGB2RED RBG24RED -# define RGB2GREEN RBG24GREEN -# define RGB2BLUE RBG24BLUE +# define RGB2RED RGB24RED +# define RGB2GREEN RGB24GREEN +# define RGB2BLUE RGB24BLUE # define FONT_RENDERER nxf_convert_24bpp #elif CONFIG_NXWIDGETS_BPP == 32 # ifdef CONFIG_NX_DISABLE_32BPP @@ -314,9 +314,9 @@ # endif # define CONFIG_NXWIDGETS_FMT FB_FMT_RGB32 # define MKRGB RGBTO24 -# define RGB2RED RBG24RED -# define RGB2GREEN RBG24GREEN -# define RGB2BLUE RBG24BLUE +# define RGB2RED RGB24RED +# define RGB2GREEN RGB24GREEN +# define RGB2BLUE RGB24BLUE # define FONT_RENDERER nxf_convert_32bpp #else # error "Pixel depth not supported (CONFIG_NXWIDGETS_BPP)" diff --git a/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx b/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx index 083868f70..ad0bd1953 100644 --- a/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx +++ b/NxWidgets/libnxwidgets/src/cscaledbitmap.cxx @@ -511,32 +511,32 @@ bool CScaledBitmap::rowColor(FAR uint8_t *row, b16_t column, #if CONFIG_NXWIDGETS_FMT == FB_FMT_RGB8_332 uint8_t color = row[col1]; - color1.r = RBG8RED(color); - color1.g = RBG8GREEN(color); - color1.b = RBG8BLUE(color); + color1.r = RGB8RED(color); + color1.g = RGB8GREEN(color); + color1.b = RGB8BLUE(color); transparent1 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); color = row[col2]; - color2.r = RBG8RED(color); - color2.g = RBG8GREEN(color); - color2.b = RBG8BLUE(color); + color2.r = RGB8RED(color); + color2.g = RGB8GREEN(color); + color2.b = RGB8BLUE(color); transparent2 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); #elif CONFIG_NXWIDGETS_FMT == FB_FMT_RGB16_565 FAR uint16_t *row16 = (FAR uint16_t*)row; uint16_t color = row16[col1]; - color1.r = RBG16RED(color); - color1.g = RBG16GREEN(color); - color1.b = RBG16BLUE(color); + color1.r = RGB16RED(color); + color1.g = RGB16GREEN(color); + color1.b = RGB16BLUE(color); transparent1 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); color = row16[col2]; - color2.r = RBG16RED(color); - color2.g = RBG16GREEN(color); - color2.b = RBG16BLUE(color); + color2.r = RGB16RED(color); + color2.g = RGB16GREEN(color); + color2.b = RGB16BLUE(color); transparent2 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); @@ -560,16 +560,16 @@ bool CScaledBitmap::rowColor(FAR uint8_t *row, b16_t column, #elif CONFIG_NXWIDGETS_FMT == FB_FMT_RGB32 FAR uint32_t *row32 = (FAR uint32_t*)row; uint32_t color = row32[col1]; - color1.r = RBG24RED(color); - color1.g = RBG24GREEN(color); - color1.b = RBG24BLUE(color); + color1.r = RGB24RED(color); + color1.g = RGB24GREEN(color); + color1.b = RGB24BLUE(color); transparent1 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); color = row32[col2]; - color2.r = RBG24RED(color); - color2.g = RBG24GREEN(color); - color2.b = RBG24BLUE(color); + color2.r = RGB24RED(color); + color2.g = RGB24GREEN(color); + color2.b = RGB24BLUE(color); transparent2 = (color == CONFIG_NXWIDGETS_TRANSPARENT_COLOR); diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 1c76c708b..cd655a695 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7327,3 +7327,6 @@ noise environments or with rogue perpipherals. Taken from the PX4 commit 099b2017ccfa0fc7696f168db2a0c2e13fe5edbc by Tridge here: https://github.com/PX4/NuttX (2014-5-10). + * include/nuttx/video/rgbcolors.h: Fix typo in several macros: RBG -> RGB. + (2014-5-12). + diff --git a/nuttx/include/nuttx/lcd/ili9325.h b/nuttx/include/nuttx/lcd/ili9325.h index 8d787fe49..dc6750337 100644 --- a/nuttx/include/nuttx/lcd/ili9325.h +++ b/nuttx/include/nuttx/lcd/ili9325.h @@ -51,7 +51,6 @@ /* ILI9325 LCD Register Addresses *****************************************************/ - #define ILI9325_DEVICE_CODE_REG 0x00 /* Driver Code Register */ #define ILI9325_START_OSC_CTRL 0x00 /* Start Oscillator Control */ #define ILI9325_DRIVER_OUTPUT_CTRL1 0x01 /* Start Oscillator Control */ diff --git a/nuttx/include/nuttx/video/rgbcolors.h b/nuttx/include/nuttx/video/rgbcolors.h index a4a9e4ff6..2b748c0e5 100644 --- a/nuttx/include/nuttx/video/rgbcolors.h +++ b/nuttx/include/nuttx/video/rgbcolors.h @@ -52,9 +52,9 @@ /* And these macros perform the inverse transformation */ -#define RBG24RED(rgb) (((rgb) >> 16) & 0xff) -#define RBG24GREEN(rgb) (((rgb) >> 8) & 0xff) -#define RBG24BLUE(rgb) ( (rgb) & 0xff) +#define RGB24RED(rgb) (((rgb) >> 16) & 0xff) +#define RGB24GREEN(rgb) (((rgb) >> 8) & 0xff) +#define RGB24BLUE(rgb) ( (rgb) & 0xff) /* This macro creates RGB16 (5:6:5) from 8:8:8 RGB: * @@ -68,9 +68,9 @@ /* 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) +#define RGB16RED(rgb) (((rgb) >> 8) & 0xf8) +#define RGB16GREEN(rgb) (((rgb) >> 3) & 0xfc) +#define RGB16BLUE(rgb) (((rgb) << 3) & 0xf8) /* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */ @@ -79,9 +79,9 @@ /* And these macros perform the inverse transformation */ -#define RBG8RED(rgb) ( (rgb) & 0xe0) -#define RBG8GREEN(rgb) (((rgb) << 3) & 0xe0) -#define RBG8BLUE(rgb) (((rgb) << 6) & 0xc0) +#define RGB8RED(rgb) ( (rgb) & 0xe0) +#define RGB8GREEN(rgb) (((rgb) << 3) & 0xe0) +#define RGB8BLUE(rgb) (((rgb) << 6) & 0xc0) /* This macro converts RGB24 (8:8:8) to RGB16 (5:6:5): * |