forked from Imagelibrary/rtems
bsp/stm32h7: Disable unused functions
Re-apply based on:
commit e4ba06f8b4
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Thu Apr 2 08:28:56 2020 +0200
bsp/stm32h7: Disable unused functions
Update #3910.
This commit is contained in:
@@ -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.
|
||||
@@ -449,6 +458,7 @@ __weak void HAL_ResumeTick(void)
|
||||
/* Enable SysTick Interrupt */
|
||||
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/**
|
||||
* @brief Returns the HAL revision
|
||||
|
||||
@@ -379,8 +379,10 @@ HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth)
|
||||
/*------------------ MAC, MTL and DMA default Configuration ----------------*/
|
||||
ETH_MACDMAConfig(heth);
|
||||
|
||||
#ifndef __rtems__
|
||||
/* SET DSL to 64 bit */
|
||||
MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT);
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/* Set Receive Buffers Length (must be a multiple of 4) */
|
||||
if ((heth->Init.RxBuffLen % 0x4U) != 0x0U)
|
||||
@@ -449,6 +451,7 @@ HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth)
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
#ifndef __rtems__
|
||||
/**
|
||||
* @brief Initializes the ETH MSP.
|
||||
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
|
||||
@@ -463,6 +466,7 @@ __weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
|
||||
the HAL_ETH_MspInit could be implemented in the user file
|
||||
*/
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/**
|
||||
* @brief DeInitializes ETH MSP.
|
||||
@@ -2959,6 +2963,7 @@ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth)
|
||||
*/
|
||||
static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
|
||||
{
|
||||
#ifndef __rtems__
|
||||
ETH_DMADescTypeDef *dmatxdesc;
|
||||
uint32_t i;
|
||||
|
||||
@@ -2986,6 +2991,7 @@ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
|
||||
|
||||
/* Set Transmit Descriptor Tail pointer */
|
||||
WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc);
|
||||
#endif /* __rtems__ */
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2997,6 +3003,7 @@ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
|
||||
*/
|
||||
static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
|
||||
{
|
||||
#ifndef __rtems__
|
||||
ETH_DMADescTypeDef *dmarxdesc;
|
||||
uint32_t i;
|
||||
|
||||
@@ -3031,6 +3038,7 @@ static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
|
||||
|
||||
/* Set Receive Descriptor Tail pointer Address */
|
||||
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U))));
|
||||
#endif /* __rtems__ */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef __rtems__
|
||||
/**
|
||||
* @brief Resets the RCC clock configuration to the default reset state.
|
||||
* @note The default reset state of the clock configuration is given below:
|
||||
@@ -387,6 +388,7 @@ HAL_StatusTypeDef HAL_RCC_DeInit(void)
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/**
|
||||
* @brief Initializes the RCC Oscillators according to the specified parameters in the
|
||||
@@ -1234,7 +1236,11 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, ui
|
||||
#endif /* DUAL_CORE && CORE_CM4 */
|
||||
|
||||
/* Configure the source of time base considering new system clocks settings*/
|
||||
#ifndef __rtems__
|
||||
halstatus = HAL_InitTick(uwTickPrio);
|
||||
#else /* __rtems__ */
|
||||
halstatus = HAL_OK;
|
||||
#endif /* __rtems__ */
|
||||
|
||||
return halstatus;
|
||||
}
|
||||
|
||||
@@ -671,6 +671,7 @@ HAL_StatusTypeDef HAL_UART_DeInit(UART_HandleTypeDef *huart)
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
#ifndef __rtems__
|
||||
/**
|
||||
* @brief Initialize the UART MSP.
|
||||
* @param huart UART handle.
|
||||
@@ -685,6 +686,7 @@ __weak void HAL_UART_MspInit(UART_HandleTypeDef *huart)
|
||||
the HAL_UART_MspInit can be implemented in the user file
|
||||
*/
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/**
|
||||
* @brief DeInitialize the UART MSP.
|
||||
|
||||
@@ -373,6 +373,7 @@ HAL_StatusTypeDef HAL_USART_DeInit(USART_HandleTypeDef *husart)
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
#ifndef __rtems__
|
||||
/**
|
||||
* @brief Initialize the USART MSP.
|
||||
* @param husart USART handle.
|
||||
@@ -387,6 +388,7 @@ __weak void HAL_USART_MspInit(USART_HandleTypeDef *husart)
|
||||
the HAL_USART_MspInit can be implemented in the user file
|
||||
*/
|
||||
}
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/**
|
||||
* @brief DeInitialize the USART MSP.
|
||||
|
||||
Reference in New Issue
Block a user