Skip to content

Commit 5618467

Browse files
committed
fix: ifdef function to avoid unused function build warning
This function is only used if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED is set, let's ifdef it to avoid a build warning in Zephyr. Note this commit is in a branch that forks from the upstream master branch. It is a provisional patch to fix Zephyr's CI. This branch should be discarded once the real fix is merged in lvgl's master branch. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent cb85b35 commit 5618467

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/draw/sw/blend/lv_draw_sw_blend_to_i1.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ static inline uint8_t /* LV_ATTRIBUTE_FAST_MEM */ get_bit(const uint8_t * buf, i
7878

7979
static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride);
8080

81-
static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw);
81+
#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED
82+
static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw);
83+
#endif
8284

8385
/**********************
8486
* STATIC VARIABLES
@@ -1271,6 +1273,7 @@ static inline uint8_t LV_ATTRIBUTE_FAST_MEM get_bit(const uint8_t * buf, int32_t
12711273
return (buf[bit_idx / 8] >> (7 - (bit_idx % 8))) & 1;
12721274
}
12731275

1276+
#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED
12741277
static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t raw)
12751278
{
12761279
lv_color16_t c;
@@ -1279,5 +1282,6 @@ static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t ra
12791282
c.blue = raw & 0x1F;
12801283
return c;
12811284
}
1285+
#endif
12821286

12831287
#endif

0 commit comments

Comments
 (0)