diff options
author | inmarket <andrewh@inmarket.com.au> | 2017-10-01 18:00:49 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2017-10-01 18:00:49 +1000 |
commit | 82047b1ac6e56361abac0c4b01f06c405e941d19 (patch) | |
tree | 85c199ec82a65f0db2e944f309a93b2b7655724f /drivers/gdisp/STM32LTDC/gdisp_lld_config.h | |
parent | 70222f8c8ddaccf1362f97f4c595d1d06ef680ef (diff) | |
download | uGFX-82047b1ac6e56361abac0c4b01f06c405e941d19.tar.gz uGFX-82047b1ac6e56361abac0c4b01f06c405e941d19.tar.bz2 uGFX-82047b1ac6e56361abac0c4b01f06c405e941d19.zip |
STM32LTDC 2nd layer support with alpha
Diffstat (limited to 'drivers/gdisp/STM32LTDC/gdisp_lld_config.h')
-rw-r--r-- | drivers/gdisp/STM32LTDC/gdisp_lld_config.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gdisp/STM32LTDC/gdisp_lld_config.h b/drivers/gdisp/STM32LTDC/gdisp_lld_config.h index 5c3b1883..1476b38b 100644 --- a/drivers/gdisp/STM32LTDC/gdisp_lld_config.h +++ b/drivers/gdisp/STM32LTDC/gdisp_lld_config.h @@ -21,8 +21,15 @@ // Both these pixel formats are supported - pick one. // RGB565 obviously is faster and uses less RAM but with lower color resolution than RGB888 -#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565 -//#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 + +#if defined(GDISP_LTDC_USE_RGB565) && GDISP_LTDC_USE_RGB565 + #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565 + #if GDISP_TOTAL_DISPLAYS > 1 + #error "LTDC: You must use RGB888 pixel format with LTDC when using dual layers as only RGB888 currently supports using alpha" + #endif +#else + #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 +#endif /*===========================================================================*/ @@ -35,9 +42,12 @@ // Accelerated bitfills are also possible but only for GDISP_ROTATE_0 // and if no color translation is required (for now) - #if !GDISP_NEED_CONTROL && GDISP_PIXELFORMAT == GDISP_LLD_PIXELFORMAT - #define GDISP_HARDWARE_BITFILLS TRUE - #endif + // Oops - this is not working and adds little performance benefit + // so we will just disable it for the near future. +// #if !GDISP_NEED_CONTROL && !defined(GDISP_PIXELFORMAT) +// #define GDISP_HARDWARE_BITFILLS TRUE +// #endif + #endif /* GDISP_USE_DMA2D */ #endif /* GFX_USE_GDISP */ |