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

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

?? stm32f10x_rcc.c

?? ucos2.86版本結(jié)合STM板極支持包
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
  tmp = tmp >> 8;
  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(IS_RCC_AHB_PERIPH(RCC_AHBPeriph));
  assert(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(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  assert(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(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  assert(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(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  assert(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(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  assert(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(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(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(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(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(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(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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕一二三区视频| 欧美高清视频在线高清观看mv色露露十八| 亚洲男人的天堂网| 精品国产免费一区二区三区四区 | 国产乱码精品一品二品| 亚洲人快播电影网| 久久众筹精品私拍模特| 91精品国产综合久久香蕉麻豆| 国产**成人网毛片九色| 蜜桃久久av一区| 午夜视频一区二区| 亚洲码国产岛国毛片在线| 久久久www成人免费毛片麻豆| 欧美蜜桃一区二区三区| 色悠久久久久综合欧美99| 国产宾馆实践打屁股91| 国产乱人伦偷精品视频不卡| 日韩电影免费在线观看网站| 亚洲一区二区三区视频在线播放| 国产精品国产三级国产aⅴ中文 | 麻豆高清免费国产一区| 亚洲午夜久久久久久久久久久| 中文字幕一区二区5566日韩| 国产亚洲精品资源在线26u| 精品少妇一区二区三区日产乱码 | 99riav一区二区三区| 成人免费黄色在线| 国产高清不卡二三区| 国产一区二区精品在线观看| 色哟哟欧美精品| 色综合天天做天天爱| 99精品在线免费| 97久久超碰国产精品| 9久草视频在线视频精品| 白白色 亚洲乱淫| 成人av影视在线观看| 成人免费va视频| 成人av手机在线观看| 99久久精品情趣| 色婷婷一区二区| 91福利国产精品| 在线视频国内一区二区| 在线观看一区日韩| 欧美日韩综合色| 欧美日韩一本到| 欧美一区二区三区影视| 日韩欧美不卡一区| 国产亚洲福利社区一区| **欧美大码日韩| 一区二区三区在线视频免费| 亚洲国产欧美一区二区三区丁香婷| 一区二区三区色| 亚洲电影第三页| 日韩国产一二三区| 国产精品自在在线| 99国产精品99久久久久久| 日本韩国欧美国产| 欧美丰满少妇xxxxx高潮对白| 日韩午夜精品电影| 久久精品一区蜜桃臀影院| 久久69国产一区二区蜜臀| 久久国内精品自在自线400部| 久久精品国产99国产精品| 国产精品一区二区无线| 97久久精品人人做人人爽50路| 在线免费不卡视频| 精品久久人人做人人爰| 国产精品第五页| 日韩国产精品久久久久久亚洲| 国产精选一区二区三区| 色av一区二区| 精品欧美一区二区三区精品久久| 国产精品久久久久久久久久免费看 | 日韩亚洲欧美综合| 欧美国产成人精品| 亚洲成人福利片| 久久精品国产精品亚洲综合| 成人综合在线观看| 91精品国产综合久久小美女| 中文字幕不卡一区| 免费人成精品欧美精品| av中文字幕不卡| 日韩欧美的一区| 亚洲自拍偷拍麻豆| 国产91精品入口| 91精品黄色片免费大全| 综合久久久久久| 激情综合色综合久久综合| 欧美专区亚洲专区| 国产人久久人人人人爽| 免费成人在线播放| 在线视频亚洲一区| 国产精品你懂的在线欣赏| 青青国产91久久久久久| 91麻豆国产自产在线观看| 亚洲精品一区二区精华| 色综合久久九月婷婷色综合| 欧美一级日韩免费不卡| 日韩久久一区二区| 国产经典欧美精品| 91精品国产一区二区三区| 亚洲美腿欧美偷拍| 国产精品一区二区在线观看网站 | 久久精品噜噜噜成人av农村| 色诱视频网站一区| 国产精品欧美久久久久无广告| 久久国产日韩欧美精品| 欧美伦理影视网| 亚洲综合男人的天堂| 成人91在线观看| 久久欧美中文字幕| 久久精品国产免费看久久精品| 欧美中文字幕亚洲一区二区va在线| 国产精品婷婷午夜在线观看| 久久99国产精品久久99果冻传媒| 欧美日韩一区三区四区| 亚洲色图另类专区| 91在线精品一区二区| 国产目拍亚洲精品99久久精品| 久久99国产精品久久99| 91精品国产综合久久精品性色| 一二三四社区欧美黄| 香蕉加勒比综合久久| 性欧美疯狂xxxxbbbb| 成人免费毛片app| 欧美精品一区二区久久久| 日韩高清一区二区| 69堂成人精品免费视频| 亚洲第一激情av| 欧美亚洲一区二区在线| 亚洲国产婷婷综合在线精品| 欧美在线综合视频| 亚洲狠狠爱一区二区三区| 欧美在线不卡视频| 亚洲夂夂婷婷色拍ww47| 色999日韩国产欧美一区二区| 亚洲蜜桃精久久久久久久| 在线欧美日韩国产| 亚洲成人动漫一区| 欧美一区二区三区电影| 美国精品在线观看| 精品久久久久久久人人人人传媒| 韩国女主播一区二区三区| 2欧美一区二区三区在线观看视频| 韩国女主播成人在线| 国产日韩高清在线| 91视频精品在这里| 亚洲福利一区二区| 日韩免费性生活视频播放| 欧美一卡2卡三卡4卡5免费| 亚洲欧洲av一区二区三区久久| 国产91综合网| 亚洲精品你懂的| 欧美电影一区二区三区| 麻豆91免费看| 国产午夜精品一区二区三区嫩草 | www.激情成人| 亚洲综合无码一区二区| 在线播放/欧美激情| 精品一二线国产| 国产精品国产三级国产普通话蜜臀| 色综合久久综合网欧美综合网 | 婷婷开心激情综合| 欧美成人伊人久久综合网| 国产福利一区二区| 亚洲精品日韩综合观看成人91| 欧美精品成人一区二区三区四区| 精品一区二区影视| 中文字幕一区在线观看| 欧美色欧美亚洲另类二区| 久久成人av少妇免费| 综合久久国产九一剧情麻豆| 欧美日韩国产成人在线91| 国产精品夜夜嗨| 亚洲综合另类小说| 国产亚洲一区二区在线观看| 一本一本大道香蕉久在线精品| 免费亚洲电影在线| 综合自拍亚洲综合图不卡区| 欧美一级黄色大片| 97精品电影院| 麻豆精品视频在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美疯狂性受xxxxx喷水图片| 国产99久久久精品| 天天综合色天天综合色h| 国产欧美久久久精品影院| 欧美精品一级二级三级| 99这里只有久久精品视频| 99re成人精品视频| 久久99精品久久久久婷婷| 亚洲午夜日本在线观看| 亚洲国产成人在线| 欧美一级淫片007| 欧洲生活片亚洲生活在线观看| 国产激情一区二区三区桃花岛亚洲| 天天色综合天天| 亚洲日本电影在线| 国产亚洲精品久| 日韩精品一区二区三区视频在线观看 |