mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix 1bit lv_color compilation warnings/errors introduced by 3da868a0905ccbdafb4bbbf9c301d4f66eb2cf86
This commit is contained in:
parent
6f762bb7c7
commit
57e2a6d983
@ -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 */
|
/* The most simple macro to create a color from R,G and B values */
|
||||||
#if LV_COLOR_DEPTH == 1
|
#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)
|
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);
|
color.full = (b8 >> 7 | g8 >> 7 | r8 >> 7);
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user