From e4ba06f8b49da4334543f713ba437263c794d7ee Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 2 Apr 2020 08:28:56 +0200 Subject: bsp/stm32h7: Disable unused functions Update #3910. --- bsps/arm/stm32h7/hal/stm32h7xx_hal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bsps/arm/stm32h7/hal/stm32h7xx_hal.c') diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal.c index 3e92312e99..8fc0f84c93 100644 --- a/bsps/arm/stm32h7/hal/stm32h7xx_hal.c +++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal.c @@ -68,9 +68,11 @@ /** @defgroup HAL_Exported_Variables HAL Exported Variables * @{ */ +#ifndef __rtems__ __IO uint32_t uwTick; uint32_t uwTickPrio = (1UL << __NVIC_PRIO_BITS); /* Invalid PRIO */ HAL_TickFreqTypeDef uwTickFreq = HAL_TICK_FREQ_DEFAULT; /* 1KHz */ +#endif /* __rtems__ */ /** * @} */ @@ -166,11 +168,13 @@ uint32_t common_system_clock; SystemCoreClock = common_system_clock; #endif /* DUAL_CORE && CORE_CM4 */ +#ifndef __rtems__ /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) { return HAL_ERROR; } +#endif /* __rtems__ */ /* Init the low level hardware */ HAL_MspInit(); @@ -179,6 +183,7 @@ uint32_t common_system_clock; return HAL_OK; } +#ifndef __rtems__ /** * @brief This function de-Initializes common part of the HAL and stops the systick. * This function is optional. @@ -220,7 +225,9 @@ HAL_StatusTypeDef HAL_DeInit(void) /* Return function status */ return HAL_OK; } +#endif /* __rtems__ */ +#ifndef __rtems__ /** * @brief Initializes the MSP. * @retval None @@ -287,6 +294,7 @@ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) /* Return function status */ return HAL_OK; } +#endif /* __rtems__ */ /** * @} @@ -315,6 +323,7 @@ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) * @{ */ +#ifndef __rtems__ /** * @brief This function is called to increment a global variable "uwTick" * used as application time base. @@ -448,6 +457,7 @@ __weak void HAL_ResumeTick(void) /* Enable SysTick Interrupt */ SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk; } +#endif /* __rtems__ */ /** * @brief Returns the HAL revision -- cgit v1.2.3