boards/library/bsp/stm32f10xfwlib/src/stm32f10x_rcc.c
/**
  * @brief  Configures the system clock (SYSCLK).
  * @param  RCC_SYSCLKSource: specifies the clock source used as system clock.
  *   This parameter can be one of the following values:
  *     @arg RCC_SYSCLKSource_HSI: HSI selected as system clock
  *     @arg RCC_SYSCLKSource_HSE: HSE selected as system clock
  *     @arg RCC_SYSCLKSource_PLLCLK: PLL selected as system clock
  * @retval None
  */
@brief  Configures the system clock (SYSCLK).
@param  RCC_SYSCLKSource: specifies the clock source used as system clock.
This parameter can be one of the following values:
@arg RCC_SYSCLKSource_HSI: HSI selected as system clock
@arg RCC_SYSCLKSource_HSE: HSE selected as system clock
@arg RCC_SYSCLKSource_PLLCLK: PLL selected as system clock
@retval None
@brief Configures the system clock ( SYSCLK ) . @param RCC_SYSCLKSource : specifies the clock source used as system clock . This parameter can be one of the following values : @arg RCC_SYSCLKSource_HSI : HSI selected as system clock @arg RCC_SYSCLKSource_HSE : HSE selected as system clock @arg RCC_SYSCLKSource_PLLCLK : PLL selected as system clock @retval None
void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource)
{
  uint32_t tmpreg = 0;
  assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
  tmpreg = RCC->CFGR;
  tmpreg &= CFGR_SW_Mask;
  tmpreg |= RCC_SYSCLKSource;
  RCC->CFGR = tmpreg;
}
void RCC_SYSCLKConfig ( uint32_t RCC_SYSCLKSource ) { uint32_t tmpreg = 0 ; assert_param ( IS_RCC_SYSCLK_SOURCE ( RCC_SYSCLKSource ) ) ; tmpreg = RCC -> CFGR ; tmpreg &= CFGR_SW_Mask ; tmpreg |= RCC_SYSCLKSource ; RCC -> CFGR = tmpreg ; }
@brief  Configures the system clock (SYSCLK).
@brief Configures the system clock ( SYSCLK ) .
/* Check the parameters */ /* Clear SW[1:0] bits */ /* Set SW[1:0] bits according to RCC_SYSCLKSource value */ /* Store the new value */