summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/rgbcolors.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/rgbcolors.h b/nuttx/include/nuttx/rgbcolors.h
index d2fcba8f1..93212f6e1 100644
--- a/nuttx/include/nuttx/rgbcolors.h
+++ b/nuttx/include/nuttx/rgbcolors.h
@@ -70,7 +70,7 @@
/* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */
#define RGBTO8(r,g,b) \
- ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(r) << 2) & 0x1c) | ((uint8_t)(r) & 0x03))
+ ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03))
/* And these macros perform the inverse transformation */