2015-07-08 00:41:20 +00:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms of the GFX License. If a copy of
|
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
2018-10-01 15:32:39 +00:00
|
|
|
* http://ugfx.io/license.html
|
2015-07-08 00:41:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GDISP_LLD_CONFIG_H
|
|
|
|
#define _GDISP_LLD_CONFIG_H
|
|
|
|
|
|
|
|
#if GFX_USE_GDISP
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver hardware support. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_DRAWPIXEL GFXON
|
|
|
|
#define GDISP_HARDWARE_PIXELREAD GFXON
|
|
|
|
#define GDISP_HARDWARE_CONTROL GFXON
|
2015-11-25 02:20:56 +00:00
|
|
|
|
|
|
|
// Both these pixel formats are supported - pick one.
|
|
|
|
// RGB565 obviously is faster and uses less RAM but with lower color resolution than RGB888
|
2021-08-17 12:23:57 +00:00
|
|
|
#if defined(STM32LTDC_USE_RGB565) && STM32LTDC_USE_RGB565
|
2017-10-01 08:00:49 +00:00
|
|
|
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565
|
2021-08-18 15:12:12 +00:00
|
|
|
#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."
|
2017-10-01 08:00:49 +00:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB888
|
|
|
|
#endif
|
2015-07-08 00:41:20 +00:00
|
|
|
|
2015-07-11 23:43:23 +00:00
|
|
|
/*===========================================================================*/
|
|
|
|
/* Don't change stuff below this line. Please. */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
2021-08-18 14:38:23 +00:00
|
|
|
// LLD command to swap buffers if double buffering is enabled.
|
|
|
|
#if STM32LTDC_USE_DOUBLEBUFFERING
|
|
|
|
#define STM32LTDC_CONTROL_SHOW_BUFFER (GDISP_CONTROL_LLD+0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Adjust driver config if DMA2D is enabled.
|
2021-08-17 12:23:57 +00:00
|
|
|
#if STM32LTDC_USE_DMA2D
|
2015-11-25 02:20:56 +00:00
|
|
|
// DMA2D supports accelerated fills
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_FILLS GFXON
|
2015-11-25 02:20:56 +00:00
|
|
|
|
2018-07-08 03:51:20 +00:00
|
|
|
// Accelerated bitfills are also possible but only for gOrientation0
|
2015-11-25 02:20:56 +00:00
|
|
|
// and if no color translation is required (for now)
|
2017-10-02 03:27:10 +00:00
|
|
|
#if !GDISP_NEED_CONTROL && !defined(GDISP_PIXELFORMAT)
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_BITFILLS GFXON
|
2017-10-02 03:27:10 +00:00
|
|
|
#endif
|
2015-07-11 23:43:23 +00:00
|
|
|
#endif /* GDISP_USE_DMA2D */
|
|
|
|
|
2015-07-08 00:41:20 +00:00
|
|
|
#endif /* GFX_USE_GDISP */
|
|
|
|
|
|
|
|
#endif /* _GDISP_LLD_CONFIG_H */
|