diff options
author | Karel Gardas <karel@functional.vision> | 2023-07-19 18:04:28 +0200 |
---|---|---|
committer | Karel Gardas <karel@functional.vision> | 2023-07-31 15:15:09 +0200 |
commit | f728eb4dc4e19fce942f4762882f9a2aa06087b9 (patch) | |
tree | d3d85d6d98c286580ffc2795543ffc2848eeff41 /bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c | |
parent | bsps/arm: fix nested extern decl. warnings brought by CMSIS files update (diff) | |
download | rtems-f728eb4dc4e19fce942f4762882f9a2aa06087b9.tar.bz2 |
bsps/stm32h7: update STM32 H7 HAL
This patch updates STM32 H7 HAL source files. The files are taken from two
STM projects from their github.com repositories:
(i)
https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git
The project files are still available under BSD-3 license
and the version/commit used is:
d5fc8d05fc16fa2a2a2f948cf6c6ab39e78358e1
which represents post Release v1.11.1 development tree.
(ii)
https://github.com/STMicroelectronics/cmsis_device_h7.git
The project files were re-licensed from previous BSD-3 to Apache 2.0
license. Fortunately the project does not contain NOTICE file so no need
to do anything special when used in RTEMS.
The project version/commit imported is:
6d5ef249bec5177e0e2a0880ed62df2132874d99
which is code-wise Release v1.10.3 exactly.
Diffstat (limited to '')
-rw-r--r-- | bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c b/bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c index ccdb35e794..e79d451964 100644 --- a/bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c +++ b/bsps/arm/stm32h7/hal/stm32h7xx_ll_dma2d.c @@ -6,17 +6,16 @@ ****************************************************************************** * @attention * - * <h2><center>© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.</center></h2> + * Copyright (c) 2017 STMicroelectronics. + * All rights reserved. * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ -#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__) +#if defined(USE_FULL_LL_DRIVER) /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_ll_dma2d.h" @@ -25,7 +24,7 @@ #include "stm32_assert.h" #else #define assert_param(expr) ((void)0U) -#endif +#endif /* USE_FULL_ASSERT */ /** @addtogroup STM32H7xx_LL_Driver * @{ @@ -175,9 +174,12 @@ ErrorStatus LL_DMA2D_DeInit(DMA2D_TypeDef *DMA2Dx) ErrorStatus LL_DMA2D_Init(DMA2D_TypeDef *DMA2Dx, LL_DMA2D_InitTypeDef *DMA2D_InitStruct) { ErrorStatus status = ERROR; - LL_DMA2D_ColorTypeDef DMA2D_ColorStruct; - uint32_t tmp, tmp1, tmp2; - uint32_t regMask, regValue; + LL_DMA2D_ColorTypeDef dma2d_colorstruct; + uint32_t tmp; + uint32_t tmp1; + uint32_t tmp2; + uint32_t regMask; + uint32_t regValue; /* Check the parameters */ assert_param(IS_DMA2D_ALL_INSTANCE(DMA2Dx)); @@ -228,12 +230,12 @@ ErrorStatus LL_DMA2D_Init(DMA2D_TypeDef *DMA2Dx, LL_DMA2D_InitTypeDef *DMA2D_Ini LL_DMA2D_SetOutputMemAddr(DMA2Dx, DMA2D_InitStruct->OutputMemoryAddress); /* DMA2D OCOLR register configuration ------------------------------------------*/ - DMA2D_ColorStruct.ColorMode = DMA2D_InitStruct->ColorMode; - DMA2D_ColorStruct.OutputBlue = DMA2D_InitStruct->OutputBlue; - DMA2D_ColorStruct.OutputGreen = DMA2D_InitStruct->OutputGreen; - DMA2D_ColorStruct.OutputRed = DMA2D_InitStruct->OutputRed; - DMA2D_ColorStruct.OutputAlpha = DMA2D_InitStruct->OutputAlpha; - LL_DMA2D_ConfigOutputColor(DMA2Dx, &DMA2D_ColorStruct); + dma2d_colorstruct.ColorMode = DMA2D_InitStruct->ColorMode; + dma2d_colorstruct.OutputBlue = DMA2D_InitStruct->OutputBlue; + dma2d_colorstruct.OutputGreen = DMA2D_InitStruct->OutputGreen; + dma2d_colorstruct.OutputRed = DMA2D_InitStruct->OutputRed; + dma2d_colorstruct.OutputAlpha = DMA2D_InitStruct->OutputAlpha; + LL_DMA2D_ConfigOutputColor(DMA2Dx, &dma2d_colorstruct); status = SUCCESS; } @@ -333,9 +335,9 @@ void LL_DMA2D_ConfigLayer(DMA2D_TypeDef *DMA2Dx, LL_DMA2D_LayerCfgTypeDef *DMA2D (DMA2D_FGPFCCR_ALPHA | DMA2D_FGPFCCR_RBS | DMA2D_FGPFCCR_AI | DMA2D_FGPFCCR_CSS | DMA2D_FGPFCCR_AM | \ DMA2D_FGPFCCR_CS | DMA2D_FGPFCCR_CCM | DMA2D_FGPFCCR_CM), \ ((DMA2D_LayerCfg->Alpha << DMA2D_FGPFCCR_ALPHA_Pos) | DMA2D_LayerCfg->RBSwapMode | \ - DMA2D_LayerCfg->AlphaInversionMode | DMA2D_LayerCfg->ChromaSubSampling | \ - DMA2D_LayerCfg->AlphaMode | (DMA2D_LayerCfg->CLUTSize << DMA2D_FGPFCCR_CS_Pos) | \ - DMA2D_LayerCfg->CLUTColorMode | DMA2D_LayerCfg->ColorMode)); + DMA2D_LayerCfg->AlphaInversionMode | DMA2D_LayerCfg->ChromaSubSampling | \ + DMA2D_LayerCfg->AlphaMode | (DMA2D_LayerCfg->CLUTSize << DMA2D_FGPFCCR_CS_Pos) | \ + DMA2D_LayerCfg->CLUTColorMode | DMA2D_LayerCfg->ColorMode)); /* Configure the foreground color */ LL_DMA2D_FGND_SetColor(DMA2Dx, DMA2D_LayerCfg->Red, DMA2D_LayerCfg->Green, DMA2D_LayerCfg->Blue); @@ -630,6 +632,3 @@ void LL_DMA2D_ConfigSize(DMA2D_TypeDef *DMA2Dx, uint32_t NbrOfLines, uint32_t Nb */ #endif /* USE_FULL_LL_DRIVER */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - |