STM32LTDC: Improve pixel format detection if 2nd layer is used
This is necessary as using double buffering via STM32LTDC_USE_DOUBLEBUFFERING will also result in GDISP_TOTAL_DISPLAYS being larger than 1.
This commit is contained in:
parent
72200af286
commit
77f10024e0
@ -22,8 +22,8 @@
|
|||||||
// RGB565 obviously is faster and uses less RAM but with lower color resolution than RGB888
|
// RGB565 obviously is faster and uses less RAM but with lower color resolution than RGB888
|
||||||
#if defined(STM32LTDC_USE_RGB565) && STM32LTDC_USE_RGB565
|
#if defined(STM32LTDC_USE_RGB565) && STM32LTDC_USE_RGB565
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
|
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
|
||||||
#if GDISP_TOTAL_DISPLAYS > 1
|
#if defined(STM32LTDC_USE_LAYER2) && STM32LTDC_USE_LAYER2
|
||||||
#error "GDISP - STM32LTDC: You must use RGB888 pixel format with LTDC when using dual layers as only RGB888 currently supports using alpha"
|
#error "GDISP - STM32LTDC: You must use RGB888 pixel format with LTDC when using both layers as only RGB888 currently supports using alpha."
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888
|
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888
|
||||||
|
Loading…
Reference in New Issue
Block a user