Browse Source

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.
develop
Joel Bodenmann 2 years ago
parent
commit
77f10024e0
  1. 4
      drivers/gdisp/STM32LTDC/gdisp_lld_config.h

4
drivers/gdisp/STM32LTDC/gdisp_lld_config.h

@ -22,8 +22,8 @@
// RGB565 obviously is faster and uses less RAM but with lower color resolution than RGB888
#if defined(STM32LTDC_USE_RGB565) && STM32LTDC_USE_RGB565
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
#if GDISP_TOTAL_DISPLAYS > 1
#error "GDISP - STM32LTDC: You must use RGB888 pixel format with LTDC when using dual layers as only RGB888 currently supports using alpha"
#if defined(STM32LTDC_USE_LAYER2) && STM32LTDC_USE_LAYER2
#error "GDISP - STM32LTDC: You must use RGB888 pixel format with LTDC when using both layers as only RGB888 currently supports using alpha."
#endif
#else
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888

Loading…
Cancel
Save