STM32LTDC: Expose more options to board file
This commit is contained in:
parent
2de054b530
commit
91247717a0
@ -23,7 +23,9 @@ static const SPIConfig spi_cfg = {
|
|||||||
((1 << 3) & SPI_CR1_BR) | SPI_CR1_SSM | SPI_CR1_SSI | SPI_CR1_MSTR
|
((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_USE_2ND_LAYER GFXON
|
||||||
|
#define LTDC_DMA_CACHE_FLUSH GFXOFF // This will be turned on automatically on certain systems/platforms
|
||||||
|
|
||||||
static const ltdcConfig driverCfg = {
|
static const ltdcConfig driverCfg = {
|
||||||
240, 320,
|
240, 320,
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
#include "stm32f4xx_hal.h"
|
#include "stm32f4xx_hal.h"
|
||||||
#include "stm324x9i_eval_sdram.h"
|
#include "stm324x9i_eval_sdram.h"
|
||||||
|
|
||||||
|
#define LTDC_USE_DMA2D GFXON
|
||||||
#define LTDC_USE_2ND_LAYER 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
|
// Panel parameters
|
||||||
// This panel is a AMPIRE640480 panel.
|
// This panel is a AMPIRE640480 panel.
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
#ifndef _GDISP_LLD_BOARD_H
|
#ifndef _GDISP_LLD_BOARD_H
|
||||||
#define _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. */
|
/* Avoid naming collisions with CubeHAL. */
|
||||||
#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
|
#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
|
||||||
#undef Red
|
#undef Red
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#define AFRH AFR[1]
|
#define AFRH AFR[1]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LTDC_USE_DMA2D GFXON
|
||||||
#define LTDC_USE_2ND_LAYER 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 = {
|
static const ltdcConfig driverCfg = {
|
||||||
480, 272, // Width, Height (pixels)
|
480, 272, // Width, Height (pixels)
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#ifndef _GDISP_LLD_BOARD_H
|
#ifndef _GDISP_LLD_BOARD_H
|
||||||
#define _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 = {
|
static const ltdcConfig driverCfg = {
|
||||||
480, 272, // Width, Height (pixels)
|
480, 272, // Width, Height (pixels)
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
#define GDISP_DRIVER_VMT GDISPVMT_STM32LTDC
|
#define GDISP_DRIVER_VMT GDISPVMT_STM32LTDC
|
||||||
#include "gdisp_lld_config.h"
|
#include "gdisp_lld_config.h"
|
||||||
#include "../../../src/gdisp/gdisp_driver.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 defined(GDISP_SCREEN_HEIGHT) || defined(GDISP_SCREEN_HEIGHT)
|
||||||
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
||||||
@ -23,25 +27,6 @@
|
|||||||
#undef GDISP_SCREEN_HEIGHT
|
#undef GDISP_SCREEN_HEIGHT
|
||||||
#endif
|
#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 {
|
typedef struct ltdcLayerConfig {
|
||||||
// Frame
|
// Frame
|
||||||
LLDCOLOR_TYPE* frame; // Frame buffer address
|
LLDCOLOR_TYPE* frame; // Frame buffer address
|
||||||
@ -90,6 +75,20 @@ typedef struct ltdcConfig {
|
|||||||
|
|
||||||
#include "board_STM32LTDC.h"
|
#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. */
|
/* Driver local definitions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
Loading…
Reference in New Issue
Block a user