summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-19 11:28:45 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-27 06:11:45 +0100
commit2cfcd005e9e4a14ccda6ab4bcd5f2466762cf86d (patch)
tree27b54b5d973e9d5fbbaf373d14305688248038b2
parentbsp/stm32h7: Import from STM32CubeMX-5.6.0 (diff)
downloadrtems-2cfcd005e9e4a14ccda6ab4bcd5f2466762cf86d.tar.bz2
bsp/stm32h7: Constify some functions
Update #3910.
-rw-r--r--bsps/arm/stm32h7/hal/stm32h7xx_hal_gpio.c2
-rw-r--r--bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc.c4
-rw-r--r--bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc_ex.c10
-rw-r--r--bsps/arm/stm32h7/include/stm32h7xx_hal_gpio.h2
-rw-r--r--bsps/arm/stm32h7/include/stm32h7xx_hal_rcc.h4
-rw-r--r--bsps/arm/stm32h7/include/stm32h7xx_hal_rcc_ex.h2
6 files changed, 12 insertions, 12 deletions
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_gpio.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_gpio.c
index 13dcc40d20..4026ecefce 100644
--- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_gpio.c
+++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_gpio.c
@@ -170,7 +170,7 @@
* the configuration information for the specified GPIO peripheral.
* @retval None
*/
-void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
+void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, const GPIO_InitTypeDef *GPIO_Init)
{
uint32_t position = 0x00U;
uint32_t iocurrent;
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc.c
index 7d73fa5772..f1c28a27d7 100644
--- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc.c
+++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc.c
@@ -399,7 +399,7 @@ HAL_StatusTypeDef HAL_RCC_DeInit(void)
* first and then HSE On or HSE Bypass.
* @retval HAL status
*/
-__weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
+__weak HAL_StatusTypeDef HAL_RCC_OscConfig(const RCC_OscInitTypeDef *RCC_OscInitStruct)
{
uint32_t tickstart;
uint32_t temp1_pllckcfg, temp2_pllckcfg;
@@ -879,7 +879,7 @@ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruc
* (for more details refer to section above "Initialization/de-initialization functions")
* @retval None
*/
-HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
+HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
{
HAL_StatusTypeDef halstatus;
uint32_t tickstart;
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc_ex.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc_ex.c
index fa08e6920b..2c445e74ba 100644
--- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc_ex.c
+++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_rcc_ex.c
@@ -51,8 +51,8 @@
*/
/* Private function prototypes -----------------------------------------------*/
-static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider);
-static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider);
+static HAL_StatusTypeDef RCCEx_PLL2_Config(const RCC_PLL2InitTypeDef *pll2, uint32_t Divider);
+static HAL_StatusTypeDef RCCEx_PLL3_Config(const RCC_PLL3InitTypeDef *pll3, uint32_t Divider);
/* Exported functions --------------------------------------------------------*/
/** @defgroup RCCEx_Exported_Functions Exported Functions
@@ -95,7 +95,7 @@ static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t D
*
* @retval HAL status
*/
-HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
+HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(const RCC_PeriphCLKInitTypeDef *PeriphClkInit)
{
uint32_t tmpreg;
uint32_t tickstart;
@@ -3191,7 +3191,7 @@ __weak void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error)
*
* @retval HAL status
*/
-static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider)
+static HAL_StatusTypeDef RCCEx_PLL2_Config(const RCC_PLL2InitTypeDef *pll2, uint32_t Divider)
{
uint32_t tickstart;
@@ -3296,7 +3296,7 @@ static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t D
*
* @retval HAL status
*/
-static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider)
+static HAL_StatusTypeDef RCCEx_PLL3_Config(const RCC_PLL3InitTypeDef *pll3, uint32_t Divider)
{
uint32_t tickstart;
HAL_StatusTypeDef status = HAL_OK;
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_gpio.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_gpio.h
index c18556653e..f7f6eecea1 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_gpio.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_gpio.h
@@ -256,7 +256,7 @@ typedef enum
* @{
*/
/* Initialization and de-initialization functions *****************************/
-void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
+void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, const GPIO_InitTypeDef *GPIO_Init);
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
/**
* @}
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc.h
index ceb86440a2..08f29a0844 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc.h
@@ -7684,8 +7684,8 @@ typedef struct
*/
/* Initialization and de-initialization functions ******************************/
HAL_StatusTypeDef HAL_RCC_DeInit(void);
-HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
-HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
+HAL_StatusTypeDef HAL_RCC_OscConfig(const RCC_OscInitTypeDef *RCC_OscInitStruct);
+HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
/**
* @}
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc_ex.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc_ex.h
index 42beccc86a..0b99087fe7 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc_ex.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_rcc_ex.h
@@ -3699,7 +3699,7 @@ typedef struct
/** @addtogroup RCCEx_Exported_Functions_Group1
* @{
*/
-HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
+HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(const RCC_PeriphCLKInitTypeDef *PeriphClkInit);
void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit);
uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk);
uint32_t HAL_RCCEx_GetD1PCLK1Freq(void);