Merge pull request #1258 from joltwallet/fix/lv_color_warning

fix 1bit lv_color compilation warnings/errors introduced by ...
This commit is contained in:
Gabor Kiss-Vamosi
2019-11-11 13:07:43 +01:00
committed by GitHub

View File

@@ -392,10 +392,10 @@ static inline uint8_t lv_color_brightness(lv_color_t color)
/* The most simple macro to create a color from R,G and B values */
#if LV_COLOR_DEPTH == 1
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)})
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){.full = (b8 >> 7 | g8 >> 7 | r8 >> 7)})
static inline lv_color_t lv_color_make(int r8, int g8, int b8)
{
lv_color_t color;
lv_color_t color = { 0 };
color.full = (b8 >> 7 | g8 >> 7 | r8 >> 7);
return color;
}