aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gdisp.h1
-rw-r--r--include/gdisp_lld.h2
-rw-r--r--include/gwin.h2
3 files changed, 2 insertions, 3 deletions
diff --git a/include/gdisp.h b/include/gdisp.h
index 9be97a12..db865284 100644
--- a/include/gdisp.h
+++ b/include/gdisp.h
@@ -293,6 +293,7 @@ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
/* Now obsolete functions */
#define gdispBlitArea(x, y, cx, cy, buffer) gdispBlitAreaEx(x, y, cx, cy, 0, 0, cx, buffer)
+#define RGB565CONVERT(r,g,b) RGB2COLOR(r,g,b)
/* Macro definitions for common gets and sets */
#define gdispSetPowerMode(powerMode) gdispControl(GDISP_CONTROL_POWER, (void *)(unsigned)(powerMode))
diff --git a/include/gdisp_lld.h b/include/gdisp_lld.h
index 8b7dd0e7..1a78e448 100644
--- a/include/gdisp_lld.h
+++ b/include/gdisp_lld.h
@@ -468,8 +468,6 @@
#define RED_OF(c) (((c) & 0xF800)>>8)
#define GREEN_OF(c) (((c)&0x007E)>>3)
#define BLUE_OF(c) (((c)&0x001F)<<3)
- #define RGB565CONVERT(red, green, blue) (uint16_t)( (( red >> 3 ) << 11 ) | (( green >> 2 ) << 5 ) | ( blue >> 3 ))
-
#elif GDISP_PIXELFORMAT == GDISP_PIXELFORMAT_RGB888
typedef uint32_t color_t;
diff --git a/include/gwin.h b/include/gwin.h
index 79b8371c..37fecab4 100644
--- a/include/gwin.h
+++ b/include/gwin.h
@@ -66,7 +66,7 @@
/* Low Level Driver details and error checks. */
/*===========================================================================*/
-#if !defined(GFX_USE_GDISP)
+#if !defined(GFX_USE_GDISP) || !GFX_USE_GDISP
#error "GWIN: GFX_USE_GDISP must also be defined"
#endif
#include "gdisp.h"