mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Fix GPU support with STM32F746
This commit is contained in:
parent
aad8667a9f
commit
a7c1d97164
@ -154,7 +154,9 @@ void lv_gpu_stm32_dma2d_copy(lv_color_t * buf, lv_coord_t buf_w, const lv_color_
|
|||||||
hdma2d.LayerCfg[1].InputAlpha = 0xFF;
|
hdma2d.LayerCfg[1].InputAlpha = 0xFF;
|
||||||
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_FORMAT;
|
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_FORMAT;
|
||||||
hdma2d.LayerCfg[1].InputOffset = map_w - copy_w;
|
hdma2d.LayerCfg[1].InputOffset = map_w - copy_w;
|
||||||
|
#ifndef STM32F746G_DISCO
|
||||||
hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* DMA2D Initialization */
|
/* DMA2D Initialization */
|
||||||
HAL_DMA2D_Init(&hdma2d);
|
HAL_DMA2D_Init(&hdma2d);
|
||||||
@ -189,14 +191,18 @@ void lv_gpu_stm32_dma2d_blend(lv_color_t * buf, lv_coord_t buf_w, const lv_color
|
|||||||
hdma2d.LayerCfg[0].AlphaMode = DMA2D_NO_MODIF_ALPHA;
|
hdma2d.LayerCfg[0].AlphaMode = DMA2D_NO_MODIF_ALPHA;
|
||||||
hdma2d.LayerCfg[0].InputColorMode = DMA2D_INPUT_FORMAT;
|
hdma2d.LayerCfg[0].InputColorMode = DMA2D_INPUT_FORMAT;
|
||||||
hdma2d.LayerCfg[0].InputOffset = buf_w - copy_w;
|
hdma2d.LayerCfg[0].InputOffset = buf_w - copy_w;
|
||||||
|
#ifndef STM32F746G_DISCO
|
||||||
hdma2d.LayerCfg[0].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
hdma2d.LayerCfg[0].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Foreground layer */
|
/* Foreground layer */
|
||||||
hdma2d.LayerCfg[1].AlphaMode = DMA2D_COMBINE_ALPHA;
|
hdma2d.LayerCfg[1].AlphaMode = DMA2D_COMBINE_ALPHA;
|
||||||
hdma2d.LayerCfg[1].InputAlpha = opa;
|
hdma2d.LayerCfg[1].InputAlpha = opa;
|
||||||
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_FORMAT;
|
hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_FORMAT;
|
||||||
hdma2d.LayerCfg[1].InputOffset = map_w - copy_w;
|
hdma2d.LayerCfg[1].InputOffset = map_w - copy_w;
|
||||||
|
#ifndef STM32F746G_DISCO
|
||||||
hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* DMA2D Initialization */
|
/* DMA2D Initialization */
|
||||||
HAL_DMA2D_Init(&hdma2d);
|
HAL_DMA2D_Init(&hdma2d);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user