diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c index 2e1bc5b1be..fd3fd1ea9f 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c @@ -91,7 +91,9 @@ static inline void /* LV_ATTRIBUTE_FAST_MEM */ blend_non_normal_pixel(lv_color32 static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride); -static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED + static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#endif /********************** * STATIC VARIABLES @@ -1350,6 +1352,7 @@ static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, ui return (void *)((uint8_t *)buf + stride); } +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t raw) { lv_color16_t c; @@ -1358,6 +1361,7 @@ static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t ra c.blue = raw & 0x1F; return c; } +#endif #endif /* LV_DRAW_SW_SUPPORT_ARGB8888 */ diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c b/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c index eaeccfab7b..7fe446cab3 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_i1.c @@ -78,7 +78,9 @@ static inline uint8_t /* LV_ATTRIBUTE_FAST_MEM */ get_bit(const uint8_t * buf, i static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride); -static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED + static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#endif /********************** * STATIC VARIABLES @@ -1271,6 +1273,7 @@ static inline uint8_t LV_ATTRIBUTE_FAST_MEM get_bit(const uint8_t * buf, int32_t return (buf[bit_idx / 8] >> (7 - (bit_idx % 8))) & 1; } +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t raw) { lv_color16_t c; @@ -1279,5 +1282,6 @@ static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t ra c.blue = raw & 0x1F; return c; } +#endif #endif diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c b/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c index 91bb1162a0..63fea770b7 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_l8.c @@ -74,7 +74,9 @@ static inline void /* LV_ATTRIBUTE_FAST_MEM */ blend_non_normal_pixel(uint8_t * static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride); -static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED + static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#endif /********************** * STATIC VARIABLES @@ -1005,6 +1007,7 @@ static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, ui return (void *)((uint8_t *)buf + stride); } +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t raw) { lv_color16_t c; @@ -1013,6 +1016,7 @@ static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t ra c.blue = raw & 0x1F; return c; } +#endif #endif diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c index bca595caab..361553a32b 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c @@ -79,7 +79,9 @@ static inline uint16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color_24_16_mix(const uint static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride); -static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED + static inline lv_color16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color16_from_u16(uint16_t raw); +#endif /********************** * STATIC VARIABLES @@ -1497,6 +1499,7 @@ static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, ui return (void *)((uint8_t *)buf + stride); } +#if LV_DRAW_SW_SUPPORT_RGB565_SWAPPED static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t raw) { lv_color16_t c; @@ -1505,6 +1508,7 @@ static inline lv_color16_t LV_ATTRIBUTE_FAST_MEM lv_color16_from_u16(uint16_t ra c.blue = raw & 0x1F; return c; } +#endif #endif /*LV_DRAW_SW_SUPPORT_RGB565*/