STM32LTDC: Expose more options to board file

develop
Joel Bodenmann 2021-08-17 13:40:57 +02:00
parent 2de054b530
commit 91247717a0
6 changed files with 31 additions and 20 deletions

View File

@ -23,7 +23,9 @@ static const SPIConfig spi_cfg = {
((1 << 3) & SPI_CR1_BR) | SPI_CR1_SSM | SPI_CR1_SSI | SPI_CR1_MSTR
};
#define LTDC_USE_DMA2D GFXON
#define LTDC_USE_2ND_LAYER GFXON
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
static const ltdcConfig driverCfg = {
240, 320,

View File

@ -19,7 +19,9 @@
#include "stm32f4xx_hal.h"
#include "stm324x9i_eval_sdram.h"
#define LTDC_USE_DMA2D GFXON
#define LTDC_USE_2ND_LAYER GFXON
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
// Panel parameters
// This panel is a AMPIRE640480 panel.

View File

@ -8,6 +8,10 @@
#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
#define LTDC_USE_DMA2D GFXON
#define LTDC_USE_2ND_LAYER GFXON
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
/* Avoid naming collisions with CubeHAL. */
#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
#undef Red

View File

@ -36,7 +36,9 @@
#define AFRH AFR[1]
#endif
#define LTDC_USE_DMA2D GFXON
#define LTDC_USE_2ND_LAYER GFXON
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
static const ltdcConfig driverCfg = {
480, 272, // Width, Height (pixels)

View File

@ -8,7 +8,9 @@
#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H
#define LTDC_USE_2ND_LAYER GFXON
#define LTDC_USE_DMA2D GFXON
#define LTDC_USE_2ND_LAYER GFXOFF
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
static const ltdcConfig driverCfg = {
480, 272, // Width, Height (pixels)

View File

@ -12,6 +12,10 @@
#define GDISP_DRIVER_VMT GDISPVMT_STM32LTDC
#include "gdisp_lld_config.h"
#include "../../../src/gdisp/gdisp_driver.h"
#include "stm32_ltdc.h"
#if LTDC_USE_DMA2D
#include "stm32_dma2d.h"
#endif
#if defined(GDISP_SCREEN_HEIGHT) || defined(GDISP_SCREEN_HEIGHT)
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
@ -23,25 +27,6 @@
#undef GDISP_SCREEN_HEIGHT
#endif
#ifndef LTDC_USE_DMA2D
#define LTDC_USE_DMA2D GFXOFF
#endif
#ifndef LTDC_DMA_CACHE_FLUSH
#define LTDC_DMA_CACHE_FLUSH GFXOFF
#endif
#include "stm32_ltdc.h"
#if LTDC_USE_DMA2D
#include "stm32_dma2d.h"
#if defined(STM32F7) || defined(STM32H7) || defined(STM32F746xx)
#undef LTDC_DMA_CACHE_FLUSH
#define LTDC_DMA_CACHE_FLUSH GFXON
#endif
#endif
typedef struct ltdcLayerConfig {
// Frame
LLDCOLOR_TYPE* frame; // Frame buffer address
@ -90,6 +75,20 @@ typedef struct ltdcConfig {
#include "board_STM32LTDC.h"
#ifndef LTDC_USE_DMA2D
#define LTDC_USE_DMA2D GFXOFF
#endif
#ifndef LTDC_DMA_CACHE_FLUSH
#define LTDC_DMA_CACHE_FLUSH GFXOFF
#endif
#if LTDC_USE_DMA2D
#if defined(STM32F7) || defined(STM32H7) || defined(STM32F746xx)
#undef LTDC_DMA_CACHE_FLUSH
#define LTDC_DMA_CACHE_FLUSH GFXON
#endif
#endif
/*===========================================================================*/
/* Driver local definitions. */
/*===========================================================================*/