亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stm32f10x_rcc.c

?? STM32_TIM1_Example
?? C
?? 第 1 頁 / 共 3 頁
字號:
  presc = APBAHBPrescTable[tmp];

  /* PCLK1 clock frequency */
  RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc;

  /* Get PCLK2 prescaler */
  tmp = RCC->CFGR & CFGR_PPRE2_Set_Mask;
  tmp = tmp >> 11;
  presc = APBAHBPrescTable[tmp];

  /* PCLK2 clock frequency */
  RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc;

  /* Get ADCCLK prescaler */
  tmp = RCC->CFGR & CFGR_ADCPRE_Set_Mask;
  tmp = tmp >> 14;
  presc = ADCPrescTable[tmp];

  /* ADCCLK clock frequency */
  RCC_Clocks->ADCCLK_Frequency = RCC_Clocks->PCLK2_Frequency / presc;
}

/*******************************************************************************
* Function Name  : RCC_AHBPeriphClockCmd
* Description    : Enables or disables the AHB peripheral clock.
* Input          : - RCC_AHBPeriph: specifies the AHB peripheral to gates its clock.
*                    This parameter can be any combination of the following values:
*                       - RCC_AHBPeriph_DMA
*                       - RCC_AHBPeriph_SRAM
*                       - RCC_AHBPeriph_FLITF
*                    SRAM and FLITF clock can be disabled only during sleep mode.
*                  - NewState: new state of the specified peripheral clock.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_AHBPeriphClockCmd(u32 RCC_AHBPeriph, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RCC_AHB_PERIPH(RCC_AHBPeriph));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    RCC->AHBENR |= RCC_AHBPeriph;
  }
  else
  {
    RCC->AHBENR &= ~RCC_AHBPeriph;
  }
}

/*******************************************************************************
* Function Name  : RCC_APB2PeriphClockCmd
* Description    : Enables or disables the High Speed APB (APB2) peripheral clock.
* Input          : - RCC_APB2Periph: specifies the APB2 peripheral to gates its
*                    clock.
*                    This parameter can be any combination of the following values:
*                       - RCC_APB2Periph_AFIO, RCC_APB2Periph_GPIOA, RCC_APB2Periph_GPIOB
*                         RCC_APB2Periph_GPIOC, RCC_APB2Periph_GPIOD, RCC_APB2Periph_GPIOE
*                         RCC_APB2Periph_ADC1, RCC_APB2Periph_ADC2, RCC_APB2Periph_TIM1
*                         RCC_APB2Periph_SPI1, RCC_APB2Periph_USART1, RCC_APB2Periph_ALL
*                  - NewState: new state of the specified peripheral clock.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_APB2PeriphClockCmd(u32 RCC_APB2Periph, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    RCC->APB2ENR |= RCC_APB2Periph;
  }
  else
  {
    RCC->APB2ENR &= ~RCC_APB2Periph;
  }
}

/*******************************************************************************
* Function Name  : RCC_APB1PeriphClockCmd
* Description    : Enables or disables the Low Speed APB (APB1) peripheral clock.
* Input          : - RCC_APB1Periph: specifies the APB1 peripheral to gates its
*                    clock.
*                    This parameter can be any combination of the following values:
*                       - RCC_APB1Periph_TIM2, RCC_APB1Periph_TIM3, RCC_APB1Periph_TIM4
*                         RCC_APB1Periph_WWDG, RCC_APB1Periph_SPI2, RCC_APB1Periph_USART2
*                         RCC_APB1Periph_USART3, RCC_APB1Periph_I2C1, RCC_APB1Periph_I2C2
*                         RCC_APB1Periph_USB, RCC_APB1Periph_CAN, RCC_APB1Periph_BKP
*                         RCC_APB1Periph_PWR, RCC_APB1Periph_ALL
*                  - NewState: new state of the specified peripheral clock.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_APB1PeriphClockCmd(u32 RCC_APB1Periph, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    RCC->APB1ENR |= RCC_APB1Periph;
  }
  else
  {
    RCC->APB1ENR &= ~RCC_APB1Periph;
  }
}

/*******************************************************************************
* Function Name  : RCC_APB2PeriphResetCmd
* Description    : Forces or releases High Speed APB (APB2) peripheral reset.
* Input          : - RCC_APB2Periph: specifies the APB2 peripheral to reset.
*                    This parameter can be any combination of the following values:
*                       - RCC_APB2Periph_AFIO, RCC_APB2Periph_GPIOA, RCC_APB2Periph_GPIOB
*                         RCC_APB2Periph_GPIOC, RCC_APB2Periph_GPIOD, RCC_APB2Periph_GPIOE
*                         RCC_APB2Periph_ADC1, RCC_APB2Periph_ADC2, RCC_APB2Periph_TIM1
*                         RCC_APB2Periph_SPI1, RCC_APB2Periph_USART1, RCC_APB2Periph_ALL
*                  - NewState: new state of the specified peripheral reset.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_APB2PeriphResetCmd(u32 RCC_APB2Periph, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    RCC->APB2RSTR |= RCC_APB2Periph;
  }
  else
  {
    RCC->APB2RSTR &= ~RCC_APB2Periph;
  }
}

/*******************************************************************************
* Function Name  : RCC_APB1PeriphResetCmd
* Description    : Forces or releases Low Speed APB (APB1) peripheral reset.
* Input          : - RCC_APB1Periph: specifies the APB1 peripheral to reset.
*                    This parameter can be any combination of the following values:
*                       - RCC_APB1Periph_TIM2, RCC_APB1Periph_TIM3, RCC_APB1Periph_TIM4
*                         RCC_APB1Periph_WWDG, RCC_APB1Periph_SPI2, RCC_APB1Periph_USART2
*                         RCC_APB1Periph_USART3, RCC_APB1Periph_I2C1, RCC_APB1Periph_I2C2
*                         RCC_APB1Periph_USB, RCC_APB1Periph_CAN, RCC_APB1Periph_BKP
*                         RCC_APB1Periph_PWR, RCC_APB1Periph_ALL
*                  - NewState: new state of the specified peripheral clock.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_APB1PeriphResetCmd(u32 RCC_APB1Periph, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    RCC->APB1RSTR |= RCC_APB1Periph;
  }
  else
  {
    RCC->APB1RSTR &= ~RCC_APB1Periph;
  }
}

/*******************************************************************************
* Function Name  : RCC_BackupResetCmd
* Description    : Forces or releases the Backup domain reset.
* Input          : - NewState: new state of the Backup domain reset.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_BackupResetCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  *(vu32 *) BDCR_BDRST_BB = (u32)NewState;
}

/*******************************************************************************
* Function Name  : RCC_ClockSecuritySystemCmd
* Description    : Enables or disables the Clock Security System.
* Input          : - NewState: new state of the Clock Security System..
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_ClockSecuritySystemCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  *(vu32 *) CR_CSSON_BB = (u32)NewState;
}

/*******************************************************************************
* Function Name  : RCC_MCOConfig
* Description    : Selects the clock source to output on MCO pin.
* Input          : - RCC_MCO: specifies the clock source to output.
*                    This parameter can be one of the following values:
*                       - RCC_MCO_NoClock: No clock selected
*                       - RCC_MCO_SYSCLK: System clock selected
*                       - RCC_MCO_HSI: HSI oscillator clock selected
*                       - RCC_MCO_HSE: HSE oscillator clock selected
*                       - RCC_MCO_PLLCLK_Div2: PLL clock divided by 2 selected
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_MCOConfig(u8 RCC_MCO)
{
  /* Check the parameters */
  assert_param(IS_RCC_MCO(RCC_MCO));

  /* Perform Byte access to MCO[26:24] bits to select the MCO source */
  *(vu8 *) 0x40021007 = RCC_MCO;
}

/*******************************************************************************
* Function Name  : RCC_GetFlagStatus
* Description    : Checks whether the specified RCC flag is set or not.
* Input          : - RCC_FLAG: specifies the flag to check.
*                    This parameter can be one of the following values:
*                       - RCC_FLAG_HSIRDY: HSI oscillator clock ready
*                       - RCC_FLAG_HSERDY: HSE oscillator clock ready
*                       - RCC_FLAG_PLLRDY: PLL clock ready
*                       - RCC_FLAG_LSERDY: LSE oscillator clock ready
*                       - RCC_FLAG_LSIRDY: LSI oscillator clock ready
*                       - RCC_FLAG_PINRST: Pin reset
*                       - RCC_FLAG_PORRST: POR/PDR reset
*                       - RCC_FLAG_SFTRST: Software reset
*                       - RCC_FLAG_IWDGRST: Independent Watchdog reset
*                       - RCC_FLAG_WWDGRST: Window Watchdog reset
*                       - RCC_FLAG_LPWRRST: Low Power reset
* Output         : None
* Return         : The new state of RCC_FLAG (SET or RESET).
*******************************************************************************/
FlagStatus RCC_GetFlagStatus(u8 RCC_FLAG)
{
  u32 tmp = 0;
  u32 statusreg = 0;
  FlagStatus bitstatus = RESET;

  /* Check the parameters */
  assert_param(IS_RCC_FLAG(RCC_FLAG));

  /* Get the RCC register index */
  tmp = RCC_FLAG >> 5;

  if (tmp == 1)               /* The flag to check is in CR register */
  {
    statusreg = RCC->CR;
  }
  else if (tmp == 2)          /* The flag to check is in BDCR register */
  {
    statusreg = RCC->BDCR;
  }
  else                       /* The flag to check is in CSR register */
  {
    statusreg = RCC->CSR;
  }

  /* Get the flag position */
  tmp = RCC_FLAG & FLAG_Mask;

  if ((statusreg & ((u32)1 << tmp)) != (u32)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }

  /* Return the flag status */
  return bitstatus;
}

/*******************************************************************************
* Function Name  : RCC_ClearFlag
* Description    : Clears the RCC reset flags.
*                  The reset flags are: RCC_FLAG_PINRST, RCC_FLAG_PORRST,
*                  RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST,
*                  RCC_FLAG_LPWRRST
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_ClearFlag(void)
{
  /* Set RMVF bit to clear the reset flags */
  RCC->CSR |= CSR_RMVF_Set;
}

/*******************************************************************************
* Function Name  : RCC_GetITStatus
* Description    : Checks whether the specified RCC interrupt has occurred or not.
* Input          : - RCC_IT: specifies the RCC interrupt source to check.
*                    This parameter can be one of the following values:
*                       - RCC_IT_LSIRDY: LSI ready interrupt
*                       - RCC_IT_LSERDY: LSE ready interrupt
*                       - RCC_IT_HSIRDY: HSI ready interrupt
*                       - RCC_IT_HSERDY: HSE ready interrupt
*                       - RCC_IT_PLLRDY: PLL ready interrupt
*                       - RCC_IT_CSS: Clock Security System interrupt
* Output         : None
* Return         : The new state of RCC_IT (SET or RESET).
*******************************************************************************/
ITStatus RCC_GetITStatus(u8 RCC_IT)
{
  ITStatus bitstatus = RESET;

  /* Check the parameters */
  assert_param(IS_RCC_GET_IT(RCC_IT));

  /* Check the status of the specified RCC interrupt */
  if ((RCC->CIR & RCC_IT) != (u32)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }

  /* Return the RCC_IT status */
  return  bitstatus;
}

/*******************************************************************************
* Function Name  : RCC_ClearITPendingBit
* Description    : Clears the RCC抯 interrupt pending bits.
* Input          : - RCC_IT: specifies the interrupt pending bit to clear.
*                    This parameter can be any combination of the following values:
*                       - RCC_IT_LSIRDY: LSI ready interrupt
*                       - RCC_IT_LSERDY: LSE ready interrupt
*                       - RCC_IT_HSIRDY: HSI ready interrupt
*                       - RCC_IT_HSERDY: HSE ready interrupt
*                       - RCC_IT_PLLRDY: PLL ready interrupt
*                       - RCC_IT_CSS: Clock Security System interrupt
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_ClearITPendingBit(u8 RCC_IT)
{
  /* Check the parameters */
  assert_param(IS_RCC_CLEAR_IT(RCC_IT));

  /* Perform Byte access to RCC_CIR[23:16] bits to clear the selected interrupt
     pending bits */
  *(vu8 *) 0x4002100A = RCC_IT;
}

/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国成人精品a∨在线观看| 一区二区三区国产精品| 久久福利资源站| 亚洲精品一区二区精华| 精品伊人久久久久7777人| 久久嫩草精品久久久久| 成人午夜激情在线| 亚洲精品成人少妇| 欧美一区二区三区影视| 国产自产2019最新不卡| 中文字幕一区二区三区四区不卡 | 国产精品久久久久天堂| 91污片在线观看| 日韩综合一区二区| 久久人人97超碰com| 色综合久久综合网| 日韩精品一级中文字幕精品视频免费观看 | 亚洲第一在线综合网站| 日韩精品在线网站| 不卡一区在线观看| 日韩国产欧美一区二区三区| 国产欧美日产一区| 91国产福利在线| 国产一区999| 夜夜夜精品看看| 欧美电视剧免费全集观看| 成人福利视频在线看| 亚洲 欧美综合在线网络| 久久久久久久av麻豆果冻| 在线观看日韩一区| 国产精品资源网站| 亚洲18色成人| 国产精品久久夜| 欧美一区二区三区的| jlzzjlzz欧美大全| 蜜臀久久久久久久| 亚洲色图.com| 亚洲精品在线三区| 欧美日本国产一区| 99精品久久99久久久久| 国产综合色精品一区二区三区| 亚洲精品午夜久久久| 久久精品亚洲精品国产欧美kt∨| 欧美日韩一区小说| av动漫一区二区| 国产一区二区三区四| 日韩精品久久理论片| 亚洲品质自拍视频| 国产日韩精品久久久| 日韩欧美一区二区不卡| 欧美日韩一区二区三区四区五区| 成人性视频免费网站| 国精产品一区一区三区mba桃花 | 欧美韩日一区二区三区| 日韩欧美你懂的| 91精品国产欧美一区二区18 | 精品国产第一区二区三区观看体验| 一本大道久久a久久综合| 国产精品一区二区无线| 久久精品国产99| 蜜臀精品一区二区三区在线观看| 亚洲第一二三四区| 亚洲一区二区视频| 亚洲欧美日韩国产另类专区| 国产精品久久一级| 欧美国产日韩精品免费观看| 国产网红主播福利一区二区| 337p日本欧洲亚洲大胆精品| 日韩你懂的在线播放| 欧美久久久久免费| 91.麻豆视频| 91精品国产色综合久久久蜜香臀| 欧美日韩国产在线播放网站| 欧美日韩精品高清| 欧美视频中文字幕| 欧美亚洲图片小说| 欧美色爱综合网| 欧美高清视频www夜色资源网| 欧美性做爰猛烈叫床潮| 欧美老肥妇做.爰bbww| 91精品国产综合久久福利 | 国内一区二区视频| 国产精品一二三| 国产99久久久久久免费看农村| 国产成人一级电影| 成人a免费在线看| 色88888久久久久久影院按摩| 91久久久免费一区二区| 欧美性色黄大片| 日韩视频免费直播| 久久九九久精品国产免费直播| 国产精品色婷婷久久58| 亚洲欧美偷拍卡通变态| 一区二区三区欧美日韩| 蜜臀91精品一区二区三区| 国内不卡的二区三区中文字幕 | 亚洲三级小视频| 一区二区三区在线播| 亚洲v中文字幕| 麻豆国产精品777777在线| 成人动漫一区二区| 欧美性一二三区| 精品88久久久久88久久久| 国产精品国产自产拍在线| 午夜欧美2019年伦理| 国产美女娇喘av呻吟久久| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美日韩一区二区三区四区五区| 欧美大片顶级少妇| 亚洲视频一二区| 日韩电影免费一区| 成人h精品动漫一区二区三区| 欧美日韩一区二区三区四区五区| 久久综合久久99| 一区二区三区资源| 国产一区二区三区久久悠悠色av | 国产精品一级片在线观看| 色偷偷久久一区二区三区| 日韩欧美在线不卡| 亚洲欧美激情视频在线观看一区二区三区| 亚洲线精品一区二区三区八戒| 国产精品系列在线播放| 欧美日韩中文一区| 久久网站最新地址| 亚洲亚洲精品在线观看| 国产白丝精品91爽爽久久| 欧美日韩夫妻久久| 国产精品久久久久久久久免费丝袜| 日日夜夜精品视频天天综合网| 成人午夜在线播放| 日韩欧美一区在线观看| 亚洲综合小说图片| k8久久久一区二区三区| 久久综合久久综合久久| 日本亚洲欧美天堂免费| 色国产精品一区在线观看| 国产日韩精品久久久| 久久综合综合久久综合| 欧美日韩你懂得| 一区二区三区日韩精品视频| 成人午夜电影久久影院| 2021中文字幕一区亚洲| 美腿丝袜在线亚洲一区| 欧美日韩久久一区| 亚洲自拍都市欧美小说| 99国产欧美久久久精品| 国产精品丝袜在线| 国产成人精品免费在线| 精品免费日韩av| 午夜精品福利一区二区蜜股av | 国产精品一区二区黑丝| 日韩亚洲国产中文字幕欧美| 亚洲成人激情av| 欧美三级资源在线| 亚洲自拍与偷拍| 在线观看av一区二区| 亚洲同性gay激情无套| 成人三级在线视频| 欧美国产在线观看| 国产+成+人+亚洲欧洲自线| 久久免费的精品国产v∧| 看电视剧不卡顿的网站| 精品国产一区二区亚洲人成毛片| 青青草国产精品亚洲专区无| 欧美精品自拍偷拍| 天堂成人国产精品一区| 欧美一区二区三区在| 蜜桃精品视频在线| 日韩欧美久久久| 国产一区二区三区黄视频 | 国产不卡免费视频| 国产精品区一区二区三区| 成人午夜在线免费| 国产精品久久看| 91美女在线看| 亚洲国产人成综合网站| 欧美人妇做爰xxxⅹ性高电影| 日韩精品91亚洲二区在线观看| 欧美一区中文字幕| 国内外精品视频| 亚洲欧美自拍偷拍| 欧美在线一二三四区| 首页欧美精品中文字幕| 精品美女一区二区| 成人av电影在线| 亚洲一区二区不卡免费| 日韩西西人体444www| 成人午夜电影网站| 一级日本不卡的影视| 欧美一级夜夜爽| 岛国精品一区二区| 亚洲一区二区五区| 亚洲精品在线一区二区| 99久久精品国产网站| 天堂在线一区二区| 国产欧美日韩不卡免费| 欧美影片第一页| 狠狠色狠狠色合久久伊人| 综合自拍亚洲综合图不卡区| 3atv在线一区二区三区|