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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stm32f10x_rcc.c

?? STM32F RFID通訊源代碼(支持雙向發送接收)
?? C
?? 第 1 頁 / 共 3 頁
字號:
  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****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩在线不卡| 男女男精品视频| 秋霞成人午夜伦在线观看| 国产不卡一区视频| 在线成人免费观看| 亚洲美女免费视频| 国产精品1区二区.| 91精品国产欧美一区二区| 亚洲美女视频一区| av在线播放不卡| 精品sm在线观看| 日本中文字幕不卡| 欧美日韩和欧美的一区二区| 中文字幕在线免费不卡| 国产乱人伦偷精品视频不卡 | 久久综合色8888| 亚洲国产精品影院| 色婷婷综合久久久中文一区二区| 欧美国产欧美综合| 国产精品自拍网站| 精品国产1区二区| 日av在线不卡| 91精品国模一区二区三区| 一区二区三区在线影院| 成人福利视频网站| 国产精品入口麻豆原神| 国产精品一区二区视频| www欧美成人18+| 久久99国产乱子伦精品免费| 日韩色视频在线观看| 日韩成人一区二区三区在线观看| 欧美三级电影在线看| 亚洲成人免费电影| 欧美军同video69gay| 亚洲成人动漫在线观看| 欧美日韩国产三级| 亚洲mv在线观看| 91精品国产综合久久久蜜臀图片| 午夜在线电影亚洲一区| 欧美精品成人一区二区三区四区| 亚洲国产精品一区二区久久| 欧美高清视频在线高清观看mv色露露十八| 亚洲伊人色欲综合网| 欧美男男青年gay1069videost| 午夜久久久久久| 日韩欧美黄色影院| 国产一区啦啦啦在线观看| 久久精品一区二区三区四区| 不卡av电影在线播放| 亚洲另类一区二区| 欧美日韩成人一区| 狠狠色综合色综合网络| 国产欧美精品在线观看| 一本高清dvd不卡在线观看| 亚洲va中文字幕| 欧美精品一区二区三区蜜桃| 成人av片在线观看| 亚洲电影在线免费观看| 精品国产99国产精品| 成人国产亚洲欧美成人综合网 | 欧美精彩视频一区二区三区| 色综合一区二区| 男男视频亚洲欧美| 中文子幕无线码一区tr| 欧美日韩中文字幕一区二区| 黄色成人免费在线| 一区二区三区.www| 精品成人在线观看| 在线观看免费成人| 精品亚洲porn| 亚洲午夜久久久| 国产午夜一区二区三区| 欧美网站大全在线观看| 韩国精品久久久| 亚洲国产一区二区三区青草影视| 欧美精品一区二区三区视频| 欧美性大战久久久久久久蜜臀 | 五月天亚洲婷婷| 欧美激情一区二区三区在线| 欧美喷水一区二区| 不卡欧美aaaaa| 蜜臀av一区二区| 亚洲一区二区三区在线播放 | 3atv在线一区二区三区| 成人激情免费电影网址| 日本不卡123| 亚洲自拍偷拍综合| 中文字幕在线不卡国产视频| 精品伦理精品一区| 欧美日韩情趣电影| 色婷婷精品久久二区二区蜜臂av | 久久精品一区四区| 91精品国产91综合久久蜜臀| 91免费版在线看| 东方aⅴ免费观看久久av| 日本成人在线视频网站| 亚洲综合久久久久| 18欧美乱大交hd1984| 国产肉丝袜一区二区| 久久一留热品黄| 日韩一区二区三区在线| 欧美日本精品一区二区三区| 日本久久精品电影| 色婷婷久久久久swag精品| av激情综合网| 不卡的av中国片| 成人毛片老司机大片| 从欧美一区二区三区| 国产精品一区二区三区99| 精品一区二区三区在线视频| 香蕉影视欧美成人| 午夜精品久久久| 午夜精品福利在线| 首页国产丝袜综合| 日日摸夜夜添夜夜添国产精品| 亚洲国产精品自拍| 亚洲成av人片在线观看无码| 午夜精品久久久久久久99樱桃| 午夜电影网亚洲视频| 天堂成人国产精品一区| 日韩avvvv在线播放| 蜜臀精品一区二区三区在线观看 | 亚洲综合一区二区精品导航| 亚洲精品久久久久久国产精华液| 综合分类小说区另类春色亚洲小说欧美| 欧美国产欧美亚州国产日韩mv天天看完整| 久久精品人人做人人爽人人| 欧美激情一区二区三区在线| 亚洲桃色在线一区| 亚洲午夜免费电影| 美女性感视频久久| 国产成人在线视频免费播放| 不卡的电影网站| 欧美撒尿777hd撒尿| 国产精品久久久久桃色tv| 国产精品视频一二三区| 亚洲免费观看高清完整版在线观看 | 3d动漫精品啪啪一区二区竹菊| 欧美一区二区三区免费观看视频| 欧美电影免费观看高清完整版在线| 精品国产三级电影在线观看| 亚洲国产精品精华液2区45| 中文字幕在线一区| 午夜精品aaa| 国产一区二区h| 91视频国产资源| 欧美一区二区在线播放| 国产夜色精品一区二区av| 亚洲理论在线观看| 久久69国产一区二区蜜臀| 成人丝袜视频网| 69久久99精品久久久久婷婷 | 亚洲免费观看高清在线观看| 丝袜诱惑制服诱惑色一区在线观看| 精品一区二区三区久久久| 99久久国产综合精品色伊| 欧美私模裸体表演在线观看| 欧美成人猛片aaaaaaa| 亚洲精品视频免费观看| 麻豆精品新av中文字幕| av亚洲精华国产精华| 日韩精品一区国产麻豆| 亚洲男人的天堂一区二区| 精品一区二区三区不卡| 日本乱人伦一区| 国产无遮挡一区二区三区毛片日本| 亚洲狠狠爱一区二区三区| 国产成人精品亚洲日本在线桃色| 欧美日韩成人一区| 一色桃子久久精品亚洲| 精品无人区卡一卡二卡三乱码免费卡| 色综合天天综合给合国产| 久久欧美一区二区| 日韩电影在线免费看| 在线免费不卡视频| 国产精品国产成人国产三级| 经典三级视频一区| 在线91免费看| 亚洲综合另类小说| 91麻豆精品视频| 国产精品美女久久久久av爽李琼| 久久国产麻豆精品| 777亚洲妇女| 亚洲gay无套男同| 91麻豆国产香蕉久久精品| 亚洲国产经典视频| 国产一区二区三区黄视频| 日韩欧美在线综合网| 日韩激情在线观看| 欧美精品在线观看播放| 国产麻豆午夜三级精品| 日韩一区二区麻豆国产| 性做久久久久久免费观看| 欧美综合天天夜夜久久| 亚洲老妇xxxxxx| 欧美性色黄大片| 亚洲午夜久久久久久久久电影网| 在线精品国精品国产尤物884a| 亚洲黄一区二区三区| 日本精品视频一区二区|