From 6e86ae89dd1e16f0b7f55b8ee81c106de78c7e7c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 12 May 2014 13:00:48 -0600 Subject: [PATCH] Fix typo RBG -> RGB in several macros --- ChangeLog | 3 +++ include/nuttx/lcd/ili9325.h | 1 - include/nuttx/video/rgbcolors.h | 18 +++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c76c708b8..cd655a6951 100644 --- a/ChangeLog +++ b/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/include/nuttx/lcd/ili9325.h b/include/nuttx/lcd/ili9325.h index 8d787fe49b..dc67503374 100644 --- a/include/nuttx/lcd/ili9325.h +++ b/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/include/nuttx/video/rgbcolors.h b/include/nuttx/video/rgbcolors.h index a4a9e4ff6f..2b748c0e59 100644 --- a/include/nuttx/video/rgbcolors.h +++ b/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): *