From f2075a57091199bab3024ca54f1c19402c869c2e Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Tue, 12 Jun 2018 13:25:12 +0200 Subject: Add XRGB8888 native format This got lost somehow during Agptek port merge Change-Id: Ie84463ba523d2307466b49354867117e7393a440 --- firmware/export/lcd.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'firmware') diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index cf6a16572a..80ef45a573 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -134,7 +134,14 @@ struct _fb_pixel { typedef struct _fb_pixel fb_data; #define FB_DATA_SZ 3 #else /* LCD_DEPTH > 24 */ +#if (LCD_PIXELFORMAT == XRGB8888) +struct _fb_pixel { + unsigned char b, g, r, x; +}; +typedef struct _fb_pixel fb_data; +#else typedef unsigned long fb_data; +#endif #define FB_DATA_SZ 4 #endif /* LCD_DEPTH */ @@ -348,7 +355,7 @@ static inline unsigned lcd_color_to_native(unsigned color) #define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE_LCD(x) #endif /* RGB565* */ -#elif LCD_PIXELFORMAT == RGB888 +#elif (LCD_PIXELFORMAT == RGB888) || (LCD_PIXELFORMAT == XRGB8888) #define LCD_MAX_RED 255 #define LCD_MAX_GREEN 255 #define LCD_MAX_BLUE 255 -- cgit v1.2.3