Merged in MarcoKrahl/nuttx (pull request #653)

Fixes compiler errors when using LTDC and DMA2D

* stm32: ltdc and dma2d are are depends on FB_OVERLAY support

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_dma2d.h: Makes interface available when FB_OVERLAY is enabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32_ltdc: Fixes compiler error when blit support is disabled

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Updates lvgl board example

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

* stm32f429i-disco: Updates nxwm board example

    Still nxwm_main is missing.

    Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Marco Krahl 2018-06-06 21:17:57 +00:00 committed by Gregory Nutt
parent 6c1ea7983a
commit 5b96a26c1b
5 changed files with 56 additions and 40 deletions

View File

@ -2436,6 +2436,8 @@ config STM32_I2C3
config STM32_LTDC config STM32_LTDC
bool "LTDC" bool "LTDC"
default n default n
select FB
select FB_OVERLAY
depends on STM32_HAVE_LTDC depends on STM32_HAVE_LTDC
---help--- ---help---
The STM32 LTDC is an LCD-TFT Display Controller available on The STM32 LTDC is an LCD-TFT Display Controller available on

View File

@ -43,6 +43,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/video/fb.h> #include <nuttx/video/fb.h>
# ifdef CONFIG_FB_OVERLAY
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -80,9 +81,9 @@ struct dma2d_layer_s
* On error - -EINVAL * On error - -EINVAL
*/ */
#ifdef CONFIG_FB_CMAP # ifdef CONFIG_FB_CMAP
int (*setclut)(FAR const struct fb_cmap_s * cmap); int (*setclut)(FAR const struct fb_cmap_s * cmap);
#endif # endif
/* Name: fillcolor /* Name: fillcolor
* *
@ -211,4 +212,5 @@ int stm32_dma2dinitialize(void);
void stm32_dma2duninitialize(void); void stm32_dma2duninitialize(void);
# endif /* CONFIG_FB_OVERLAY */
#endif /* __ARCH_ARM_SRC_STM32_STM32_DMA2D_H */ #endif /* __ARCH_ARM_SRC_STM32_STM32_DMA2D_H */

View File

@ -557,10 +557,23 @@
/* Acceleration support for DMA2D overlays */ /* Acceleration support for DMA2D overlays */
#ifdef CONFIG_FB_CMAP #ifdef CONFIG_FB_CMAP
# define DMA2D_ACCL LTDC_BLIT_ACCL # ifdef CONFIG_OVERLAY_BLIT
# define DMA2D_ACCL FB_ACCL_BLIT | FB_ACCL_AREA
# else
# define DMA2D_ACCL FB_ACCL_AREA
# endif
#else #else
# define DMA2D_ACCL LTDC_BLIT_ACCL | FB_ACCL_TRANSP | \ # ifdef CONFIG_OVERLAY_BLIT
FB_ACCL_COLOR | FB_ACCL_BLEND # define DMA2D_ACCL FB_ACCL_AREA | \
FB_ACCL_TRANSP | \
FB_ACCL_COLOR | \
FB_ACCL_BLIT | \
FB_ACCL_BLEND
# else
# define DMA2D_ACCL FB_ACCL_AREA | \
FB_ACCL_TRANSP | \
FB_ACCL_COLOR
# endif
#endif #endif
/* Helper */ /* Helper */
@ -679,10 +692,11 @@ static void stm32_ltdc_linit(uint8_t lid);
#ifdef CONFIG_STM32_DMA2D #ifdef CONFIG_STM32_DMA2D
static void stm32_ltdc_dma2dlinit(void); static void stm32_ltdc_dma2dlinit(void);
#ifdef CONFIG_FB_OVERLAY_BLIT
# ifdef CONFIG_FB_OVERLAY_BLIT
static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer, static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer,
FAR const struct fb_area_s *area); FAR const struct fb_area_s *area);
#endif # endif
#endif #endif
#ifdef CONFIG_FB_CMAP #ifdef CONFIG_FB_CMAP
@ -2026,7 +2040,7 @@ static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer,
return (offset <= layer->oinfo.fblen && area->w > 0 && area->h > 0); return (offset <= layer->oinfo.fblen && area->w > 0 && area->h > 0);
} }
#endif #endif /* defined(CONFIG_STM32_DMA2D) && defined(CONFIG_FB_OVERLAY_BLIT) */
/**************************************************************************** /****************************************************************************
* Name: stm32_ltdc_linit * Name: stm32_ltdc_linit
@ -2646,8 +2660,6 @@ static int stm32_setblank(FAR struct fb_vtable_s *vtable,
static int stm32_setarea(FAR struct fb_vtable_s *vtable, static int stm32_setarea(FAR struct fb_vtable_s *vtable,
FAR const struct fb_overlayinfo_s *oinfo) FAR const struct fb_overlayinfo_s *oinfo)
{ {
FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL); DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
lcdinfo("vtable=%p, overlay=%d, x=%d, y=%d, w=%d, h=%d\n", vtable, lcdinfo("vtable=%p, overlay=%d, x=%d, y=%d, w=%d, h=%d\n", vtable,
oinfo->overlay, oinfo->sarea.x, oinfo->sarea.y, oinfo->sarea.w, oinfo->overlay, oinfo->sarea.x, oinfo->sarea.y, oinfo->sarea.w,
@ -2662,7 +2674,8 @@ static int stm32_setarea(FAR struct fb_vtable_s *vtable,
# ifdef CONFIG_STM32_DMA2D # ifdef CONFIG_STM32_DMA2D
if (oinfo->overlay < LTDC_NOVERLAYS) if (oinfo->overlay < LTDC_NOVERLAYS)
{ {
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay]; FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
nxsem_wait(layer->lock); nxsem_wait(layer->lock);
memcpy(&layer->oinfo.sarea, &oinfo->sarea, sizeof(struct fb_area_s)); memcpy(&layer->oinfo.sarea, &oinfo->sarea, sizeof(struct fb_area_s));

View File

@ -1,13 +1,13 @@
# CONFIG_ARCH_FPU is not set # CONFIG_ARCH_FPU is not set
# CONFIG_STM32_DMA2D_RGB888 is not set # CONFIG_FB_CMAP is not set
# CONFIG_STM32_FLASH_PREFETCH is not set # CONFIG_STM32_FLASH_PREFETCH is not set
CONFIG_ARCH_BOARD_STM32F429I_DISCO=y CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="stm32f429i-disco" CONFIG_ARCH_BOARD="stm32f429i-disco"
CONFIG_ARCH_BOARD_STM32F429I_DISCO=y
CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F429Z=y CONFIG_ARCH_CHIP_STM32F429Z=y
CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH="arm"
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y
CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y CONFIG_BUILTIN=y
@ -17,17 +17,18 @@ CONFIG_DISABLE_POLL=y
CONFIG_DRIVERS_VIDEO=y CONFIG_DRIVERS_VIDEO=y
CONFIG_EXAMPLES_FB=y CONFIG_EXAMPLES_FB=y
CONFIG_EXAMPLES_LVGLDEMO=y CONFIG_EXAMPLES_LVGLDEMO=y
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
CONFIG_EXAMPLES_NSH=y CONFIG_EXAMPLES_NSH=y
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN=y
CONFIG_FB_OVERLAY=y
CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS=y
CONFIG_GRAPHICS_LVGL=y CONFIG_GRAPHICS_LVGL=y
CONFIG_HAVE_CXX=y CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_HEAP2_BASE=0xD0000000 CONFIG_HEAP2_BASE=0xD0000000
CONFIG_HEAP2_SIZE=8081408 CONFIG_HEAP2_SIZE=8081408
CONFIG_INPUT_STMPE811=y
CONFIG_INPUT=y CONFIG_INPUT=y
CONFIG_INPUT_STMPE811=y
CONFIG_INTELHEX_BINARY=y CONFIG_INTELHEX_BINARY=y
CONFIG_LV_HOR_RES=240 CONFIG_LV_HOR_RES=240
CONFIG_LV_VER_RES=320 CONFIG_LV_VER_RES=320
@ -56,22 +57,19 @@ CONFIG_SPI_CMDDATA=y
CONFIG_START_DAY=15 CONFIG_START_DAY=15
CONFIG_START_MONTH=11 CONFIG_START_MONTH=11
CONFIG_START_YEAR=2017 CONFIG_START_YEAR=2017
CONFIG_STM32F429I_DISCO_ILI9341=y
CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_CCMEXCLUDE=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
CONFIG_STM32_DMA2D_NLAYERS=1
CONFIG_STM32_DMA2D=y
CONFIG_STM32_FSMC_SRAM=y
CONFIG_STM32_FSMC=y CONFIG_STM32_FSMC=y
CONFIG_STM32_FSMC_SRAM=y
CONFIG_STM32_I2C3=y CONFIG_STM32_I2C3=y
CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_LTDC=y
CONFIG_STM32_LTDC_FB_BASE=0xD07B5000 CONFIG_STM32_LTDC_FB_BASE=0xD07B5000
CONFIG_STM32_LTDC_FB_SIZE=307200 CONFIG_STM32_LTDC_FB_SIZE=307200
CONFIG_STM32_LTDC_INTERFACE=y
CONFIG_STM32_LTDC=y
CONFIG_STM32_PWR=y CONFIG_STM32_PWR=y
CONFIG_STM32_SPI5=y CONFIG_STM32_SPI5=y
CONFIG_STM32_USART1=y CONFIG_STM32_USART1=y
CONFIG_STM32F429I_DISCO_ILI9341=y
CONFIG_STMPE811_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE811_EDGE=y CONFIG_STMPE811_EDGE=y
CONFIG_STMPE811_THRESHX=39 CONFIG_STMPE811_THRESHX=39

View File

@ -1,33 +1,36 @@
# CONFIG_ARCH_FPU is not set # CONFIG_ARCH_FPU is not set
# CONFIG_NX_DISABLE_16BPP is not set # CONFIG_FB_CMAP is not set
# CONFIG_NXFONTS_DISABLE_16BPP is not set # CONFIG_NXFONTS_DISABLE_16BPP is not set
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set # CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
# CONFIG_NX_DISABLE_16BPP is not set
# CONFIG_STM32_FLASH_PREFETCH is not set # CONFIG_STM32_FLASH_PREFETCH is not set
CONFIG_ARCH_BOARD_STM32F429I_DISCO=y # CONFIG_STM32_LTDC_L2 is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="stm32f429i-disco" CONFIG_ARCH_BOARD="stm32f429i-disco"
CONFIG_ARCH_BOARD_STM32F429I_DISCO=y
CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F429Z=y CONFIG_ARCH_CHIP_STM32F429Z=y
CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH="arm"
CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y CONFIG_BUILTIN=y
CONFIG_DEBUG_CUSTOMOPT=y CONFIG_DEBUG_CUSTOMOPT=y
CONFIG_DEBUG_SYMBOLS=y CONFIG_DEBUG_SYMBOLS=y
CONFIG_DISABLE_POLL=y CONFIG_DISABLE_POLL=y
CONFIG_DRIVERS_VIDEO=y
CONFIG_FAT_LCNAMES=y CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y CONFIG_FAT_LFN=y
CONFIG_FB_OVERLAY=y
CONFIG_FS_FAT=y CONFIG_FS_FAT=y
CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_HEAP2_BASE=0xd0000000 CONFIG_HEAP2_BASE=0xd0000000
CONFIG_HEAP2_SIZE=8081408 CONFIG_HEAP2_SIZE=8081408
CONFIG_INPUT_STMPE811=y
CONFIG_INPUT=y CONFIG_INPUT=y
CONFIG_INPUT_STMPE811=y
CONFIG_INTELHEX_BINARY=y CONFIG_INTELHEX_BINARY=y
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=16 CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2 CONFIG_MAX_WDOGPARMS=2
CONFIG_MM_REGIONS=2 CONFIG_MM_REGIONS=2
@ -40,20 +43,18 @@ CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LIBRARY=y CONFIG_NSH_LIBRARY=y
CONFIG_NSH_LINELEN=64 CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y CONFIG_NSH_READLINE=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_KBD=y
CONFIG_NX_XYINPUT_TOUCHSCREEN=y
CONFIG_NX=y CONFIG_NX=y
CONFIG_NXFONT_SANS22X29B=y CONFIG_NXFONT_SANS22X29B=y
CONFIG_NXFONT_SANS23X27=y CONFIG_NXFONT_SANS23X27=y
CONFIG_NXTERM=y
CONFIG_NXTERM_CACHESIZE=32 CONFIG_NXTERM_CACHESIZE=32
CONFIG_NXTERM_CURSORCHAR=95 CONFIG_NXTERM_CURSORCHAR=95
CONFIG_NXTERM_MXCHARS=325 CONFIG_NXTERM_MXCHARS=325
CONFIG_NXTERM_NXKBDIN=y CONFIG_NXTERM_NXKBDIN=y
CONFIG_NXTERM=y
CONFIG_NXTK_BORDERCOLOR1=0x5cb7 CONFIG_NXTK_BORDERCOLOR1=0x5cb7
CONFIG_NXTK_BORDERCOLOR2=0x21c9 CONFIG_NXTK_BORDERCOLOR2=0x21c9
CONFIG_NXTK_BORDERCOLOR3=0xffdf CONFIG_NXTK_BORDERCOLOR3=0xffdf
CONFIG_NXWIDGETS=y
CONFIG_NXWIDGETS_BPP=16 CONFIG_NXWIDGETS_BPP=16
CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y
CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y
@ -63,7 +64,7 @@ CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=0xd73e
CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9 CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9
CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf
CONFIG_NXWIDGETS_SIZEOFCHAR=1 CONFIG_NXWIDGETS_SIZEOFCHAR=1
CONFIG_NXWIDGETS=y CONFIG_NXWM=y
CONFIG_NXWM_CALIBRATION_AVERAGE=y CONFIG_NXWM_CALIBRATION_AVERAGE=y
CONFIG_NXWM_CALIBRATION_MESSAGES=y CONFIG_NXWM_CALIBRATION_MESSAGES=y
CONFIG_NXWM_CALIBRATION_NSAMPLES=2 CONFIG_NXWM_CALIBRATION_NSAMPLES=2
@ -74,7 +75,9 @@ CONFIG_NXWM_TASKBAR_LEFT=y
CONFIG_NXWM_TASKBAR_VSPACING=4 CONFIG_NXWM_TASKBAR_VSPACING=4
CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK=1596 CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK=1596
CONFIG_NXWM_UNITTEST=y CONFIG_NXWM_UNITTEST=y
CONFIG_NXWM=y CONFIG_NX_BLOCKING=y
CONFIG_NX_KBD=y
CONFIG_NX_XYINPUT_TOUCHSCREEN=y
CONFIG_PREALLOC_TIMERS=4 CONFIG_PREALLOC_TIMERS=4
CONFIG_PREALLOC_WDOGS=4 CONFIG_PREALLOC_WDOGS=4
CONFIG_RAM_SIZE=114688 CONFIG_RAM_SIZE=114688
@ -88,21 +91,18 @@ CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y CONFIG_SDCLONE_DISABLE=y
CONFIG_START_DAY=15 CONFIG_START_DAY=15
CONFIG_START_MONTH=11 CONFIG_START_MONTH=11
CONFIG_STM32F429I_DISCO_ILI9341=y
CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_CCMEXCLUDE=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
CONFIG_STM32_DMA2D_NLAYERS=1
CONFIG_STM32_DMA2D=y
CONFIG_STM32_FSMC_SRAM=y
CONFIG_STM32_FSMC=y CONFIG_STM32_FSMC=y
CONFIG_STM32_FSMC_SRAM=y
CONFIG_STM32_I2C3=y CONFIG_STM32_I2C3=y
CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_LTDC_FB_BASE=0xd07b5000
CONFIG_STM32_LTDC_FB_SIZE=307200
CONFIG_STM32_LTDC_INTERFACE=y
CONFIG_STM32_LTDC=y CONFIG_STM32_LTDC=y
CONFIG_STM32_LTDC_FB_BASE=0xD07B5000
CONFIG_STM32_LTDC_FB_SIZE=307200
CONFIG_STM32_PWR=y CONFIG_STM32_PWR=y
CONFIG_STM32_USART1=y CONFIG_STM32_USART1=y
CONFIG_STM32F429I_DISCO_ILI9341=y
CONFIG_STMPE811_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE811_EDGE=y CONFIG_STMPE811_EDGE=y
CONFIG_STMPE811_THRESHX=39 CONFIG_STMPE811_THRESHX=39
@ -110,4 +110,5 @@ CONFIG_STMPE811_THRESHY=51
CONFIG_TASK_NAME_SIZE=0 CONFIG_TASK_NAME_SIZE=0
CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nxwm_main" CONFIG_USER_ENTRYPOINT="nxwm_main"
CONFIG_VIDEO_FB=y
CONFIG_WDOG_INTRESERVE=0 CONFIG_WDOG_INTRESERVE=0