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

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

?? stm32f10x_rcc.c

?? 51單片機的內存優化和中斷的有用知識
?? C
?? 第 1 頁 / 共 3 頁
字號:
* Return         : The clock source used as system clock. The returned value can
*                  be one of the following:
*                       - 0x00: HSI used as system clock
*                       - 0x04: HSE used as system clock
*                       - 0x08: PLL used as system clock
*******************************************************************************/
u8 RCC_GetSYSCLKSource(void)
{
  return ((u8)(RCC->CFGR & CFGR_SWS_Mask));
}

/*******************************************************************************
* Function Name  : RCC_HCLKConfig
* Description    : Configures the AHB clock (HCLK).
* Input          : - RCC_HCLK: defines the AHB clock. This clock is derived
*                    from the system clock (SYSCLK).
*                    This parameter can be one of the following values:
*                       - RCC_SYSCLK_Div1: AHB clock = SYSCLK
*                       - RCC_SYSCLK_Div2: AHB clock = SYSCLK/2
*                       - RCC_SYSCLK_Div4: AHB clock = SYSCLK/4
*                       - RCC_SYSCLK_Div8: AHB clock = SYSCLK/8
*                       - RCC_SYSCLK_Div16: AHB clock = SYSCLK/16
*                       - RCC_SYSCLK_Div64: AHB clock = SYSCLK/64
*                       - RCC_SYSCLK_Div128: AHB clock = SYSCLK/128
*                       - RCC_SYSCLK_Div256: AHB clock = SYSCLK/256
*                       - RCC_SYSCLK_Div512: AHB clock = SYSCLK/512
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_HCLKConfig(u32 RCC_HCLK)
{
  u32 tmpreg = 0;

  /* Check the parameters */
  assert(IS_RCC_HCLK(RCC_HCLK));

  tmpreg = RCC->CFGR;

  /* Clear HPRE[7:4] bits */
  tmpreg &= CFGR_HPRE_Reset_Mask;

  /* Set HPRE[7:4] bits according to RCC_HCLK value */
  tmpreg |= RCC_HCLK;

  /* Store the new value */
  RCC->CFGR = tmpreg;
}

/*******************************************************************************
* Function Name  : RCC_PCLK1Config
* Description    : Configures the Low Speed APB clock (PCLK1).
* Input          : - RCC_PCLK1: defines the APB1 clock. This clock is derived
*                    from the AHB clock (HCLK).
*                    This parameter can be one of the following values:
*                       - RCC_HCLK_Div1: APB1 clock = HCLK
*                       - RCC_HCLK_Div2: APB1 clock = HCLK/2
*                       - RCC_HCLK_Div4: APB1 clock = HCLK/4
*                       - RCC_HCLK_Div8: APB1 clock = HCLK/8
*                       - RCC_HCLK_Div16: APB1 clock = HCLK/16
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_PCLK1Config(u32 RCC_PCLK1)
{
  u32 tmpreg = 0;

  /* Check the parameters */
  assert(IS_RCC_PCLK(RCC_PCLK1));

  tmpreg = RCC->CFGR;

  /* Clear PPRE1[10:8] bits */
  tmpreg &= CFGR_PPRE1_Reset_Mask;

  /* Set PPRE1[10:8] bits according to RCC_PCLK1 value */
  tmpreg |= RCC_PCLK1;

  /* Store the new value */
  RCC->CFGR = tmpreg;
}

/*******************************************************************************
* Function Name  : RCC_PCLK2Config
* Description    : Configures the High Speed APB clock (PCLK2).
* Input          : - RCC_PCLK2: defines the APB2 clock. This clock is derived
*                    from the AHB clock (HCLK).
*                    This parameter can be one of the following values:
*                       - RCC_HCLK_Div1: APB2 clock = HCLK
*                       - RCC_HCLK_Div2: APB2 clock = HCLK/2
*                       - RCC_HCLK_Div4: APB2 clock = HCLK/4
*                       - RCC_HCLK_Div8: APB2 clock = HCLK/8
*                       - RCC_HCLK_Div16: APB2 clock = HCLK/16
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_PCLK2Config(u32 RCC_PCLK2)
{
  u32 tmpreg = 0;

  /* Check the parameters */
  assert(IS_RCC_PCLK(RCC_PCLK2));

  tmpreg = RCC->CFGR;

  /* Clear PPRE2[13:11] bits */
  tmpreg &= CFGR_PPRE2_Reset_Mask;

  /* Set PPRE2[13:11] bits according to RCC_PCLK2 value */
  tmpreg |= RCC_PCLK2 << 3;

  /* Store the new value */
  RCC->CFGR = tmpreg;
}

/*******************************************************************************
* Function Name  : RCC_ITConfig
* Description    : Enables or disables the specified RCC interrupts.
* Input          : - RCC_IT: specifies the RCC interrupt sources to be enabled
*                    or disabled.
*                    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
*                  - NewState: new state of the specified RCC interrupts.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_ITConfig(u8 RCC_IT, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_RCC_IT(RCC_IT));
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Perform Byte access to RCC_CIR[12:8] bits to enable the selected interrupts */
    *(vu8 *) 0x40021009 |= RCC_IT;
  }
  else
  {
    /* Perform Byte access to RCC_CIR[12:8] bits to disable the selected interrupts */
    *(vu8 *) 0x40021009 &= ~(u32)RCC_IT;
  }
}

/*******************************************************************************
* Function Name  : RCC_USBCLKConfig
* Description    : Configures the USB clock (USBCLK).
* Input          : - RCC_USBCLKSource: specifies the USB clock source. This clock
*                    is derived from the PLL output.
*                    This parameter can be one of the following values:
*                       - RCC_USBCLKSource_PLLCLK_1Div5: PLL clock divided by 1,5
*                         selected as USB clock source
*                       - RCC_USBCLKSource_PLLCLK_Div1: PLL clock selected as USB
*                         clock source
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_USBCLKConfig(u32 RCC_USBCLKSource)
{
  /* Check the parameters */
  assert(IS_RCC_USBCLK_SOURCE(RCC_USBCLKSource));

  *(vu32 *) CFGR_USBPRE_BB = RCC_USBCLKSource;
}

/*******************************************************************************
* Function Name  : RCC_ADCCLKConfig
* Description    : Configures the ADC clock (ADCCLK).
* Input          : - RCC_ADCCLK: defines the ADC clock. This clock is derived
*                    from the APB2 clock (PCLK2).
*                    This parameter can be one of the following values:
*                       - RCC_PCLK2_Div2: ADC clock = PCLK2/2
*                       - RCC_PCLK2_Div4: ADC clock = PCLK2/4
*                       - RCC_PCLK2_Div6: ADC clock = PCLK2/6
*                       - RCC_PCLK2_Div8: ADC clock = PCLK2/8
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_ADCCLKConfig(u32 RCC_ADCCLK)
{
  u32 tmpreg = 0;

  /* Check the parameters */
  assert(IS_RCC_ADCCLK(RCC_ADCCLK));

  tmpreg = RCC->CFGR;

  /* Clear ADCPRE[15:14] bits */
  tmpreg &= CFGR_ADCPRE_Reset_Mask;

  /* Set ADCPRE[15:14] bits according to RCC_ADCCLK value */
  tmpreg |= RCC_ADCCLK;

  /* Store the new value */
  RCC->CFGR = tmpreg;
}

/*******************************************************************************
* Function Name  : RCC_LSEConfig
* Description    : Configures the External Low Speed oscillator (LSE).
* Input          : - RCC_LSE: specifies the new state of the LSE.
*                    This parameter can be one of the following values:
*                       - RCC_LSE_OFF: LSE oscillator OFF
*                       - RCC_LSE_ON: LSE oscillator ON
*                       - RCC_LSE_Bypass: LSE oscillator bypassed with external
*                         clock
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_LSEConfig(u32 RCC_LSE)
{
  /* Check the parameters */
  assert(IS_RCC_LSE(RCC_LSE));

  /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/
  /* Reset LSEON bit */
  *(vu8 *) BDCR_BASE = RCC_LSE_OFF;

  /* Reset LSEBYP bit */
  *(vu8 *) BDCR_BASE = RCC_LSE_OFF;

  /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */
  switch(RCC_LSE)
  {
    case RCC_LSE_ON:
      /* Set LSEON bit */
      *(vu8 *) BDCR_BASE = RCC_LSE_ON;
      break;
      
    case RCC_LSE_Bypass:
      /* Set LSEBYP and LSEON bits */
      *(vu8 *) BDCR_BASE = RCC_LSE_Bypass | RCC_LSE_ON;
      break;            
      
    default:
      break;      
  }
}

/*******************************************************************************
* Function Name  : RCC_LSICmd
* Description    : Enables or disables the Internal Low Speed oscillator (LSI).
*                  LSI can not be disabled if the IWDG is running.
* Input          : - NewState: new state of the LSI.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_LSICmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

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

/*******************************************************************************
* Function Name  : RCC_RTCCLKConfig
* Description    : Configures the RTC clock (RTCCLK).
*                  Once the RTC clock is selected it can抰 be changed unless the
*                  Backup domain is reset.
* Input          : - RCC_RTCCLKSource: specifies the RTC clock source.
*                    This parameter can be one of the following values:
*                       - RCC_RTCCLKSource_LSE: LSE selected as RTC clock
*                       - RCC_RTCCLKSource_LSI: LSI selected as RTC clock
*                       - RCC_RTCCLKSource_HSE_Div128: HSE clock divided by 128
*                         selected as RTC clock
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_RTCCLKConfig(u32 RCC_RTCCLKSource)
{
  /* Check the parameters */
  assert(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource));

  /* Select the RTC clock source */
  RCC->BDCR |= RCC_RTCCLKSource;
}

/*******************************************************************************
* Function Name  : RCC_RTCCLKCmd
* Description    : Enables or disables the RTC clock.
*                  This function must be used only after the RTC clock was
*                  selected using the RCC_RTCCLKConfig function.
* Input          : - NewState: new state of the RTC clock.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_RTCCLKCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

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

/*******************************************************************************
* Function Name  : RCC_GetClocksFreq
* Description    : Returns the frequencies of different on chip clocks.
* Input          : - RCC_Clocks: pointer to a RCC_ClocksTypeDef structure which
*                    will hold the clocks frequencies.
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)
{
  u32 tmp = 0, pllmull = 0, pllsource = 0, presc = 0;

  /* Get SYSCLK source -------------------------------------------------------*/
  tmp = RCC->CFGR & CFGR_SWS_Mask;

  switch (tmp)
  {
    case 0x00:  /* HSI used as system clock */
      RCC_Clocks->SYSCLK_Frequency = HSI_Value;
      break;

    case 0x04:  /* HSE used as system clock */
      RCC_Clocks->SYSCLK_Frequency = HSE_Value;
      break;

    case 0x08:  /* PLL used as system clock */
      /* Get PLL clock source and multiplication factor ----------------------*/
      pllmull = RCC->CFGR & CFGR_PLLMull_Mask;
      pllmull = ( pllmull >> 18) + 2;

      pllsource = RCC->CFGR & CFGR_PLLSRC_Mask;

      if (pllsource == 0x00)
      {/* HSI oscillator clock divided by 2 selected as PLL clock entry */
        RCC_Clocks->SYSCLK_Frequency = (HSI_Value >> 1) * pllmull;
      }
      else
      {/* HSE selected as PLL clock entry */

        if ((RCC->CFGR & CFGR_PLLXTPRE_Mask) != (u32)RESET)
        {/* HSE oscillator clock divided by 2 */

          RCC_Clocks->SYSCLK_Frequency = (HSE_Value >> 1) * pllmull;
        }
        else
        {
          RCC_Clocks->SYSCLK_Frequency = HSE_Value * pllmull;
        }
      }
      break;

    default:
      RCC_Clocks->SYSCLK_Frequency = HSI_Value;
      break;
  }

  /* Compute HCLK, PCLK1, PCLK2 and ADCCLK clocks frequencies ----------------*/
  /* Get HCLK prescaler */
  tmp = RCC->CFGR & CFGR_HPRE_Set_Mask;
  tmp = tmp >> 4;
  presc = APBAHBPrescTable[tmp];

  /* HCLK clock frequency */
  RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc;

  /* Get PCLK1 prescaler */
  tmp = RCC->CFGR & CFGR_PPRE1_Set_Mask;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久精品一区二区三| 久久久久久日产精品| 日韩一区二区在线播放| 久久影院午夜论| 亚洲制服欧美中文字幕中文字幕| 久久精品国产久精国产| 91在线视频观看| 久久精品一区八戒影视| 日韩电影在线观看电影| 色94色欧美sute亚洲线路一久| 久久久久综合网| 日韩主播视频在线| 欧美性猛交xxxxxxxx| 综合久久综合久久| 成人午夜激情在线| 国产亚洲精品aa午夜观看| 奇米影视一区二区三区小说| 欧美日韩高清影院| 亚洲一二三区视频在线观看| 成a人片国产精品| 国产精品少妇自拍| 国产精品亚洲一区二区三区在线 | 欧美人与禽zozo性伦| 中文字幕二三区不卡| 九色|91porny| 久久综合中文字幕| 久久精品国产久精国产爱| 欧美一级在线观看| 日韩精品亚洲专区| 欧美女孩性生活视频| 婷婷亚洲久悠悠色悠在线播放| 在线免费av一区| 一区二区三区免费观看| 色综合天天天天做夜夜夜夜做| 国产精品大尺度| 色婷婷久久综合| 亚洲高清三级视频| 欧美妇女性影城| 美国欧美日韩国产在线播放| 日韩限制级电影在线观看| 久久精品国产澳门| 国产女人18毛片水真多成人如厕| 国产伦精品一区二区三区免费| 精品粉嫩aⅴ一区二区三区四区| 天堂影院一区二区| 日韩欧美中文字幕一区| 国产精品一区在线观看你懂的| 精品女同一区二区| 成人午夜电影久久影院| 亚洲麻豆国产自偷在线| 欧美日本乱大交xxxxx| 麻豆freexxxx性91精品| 久久久av毛片精品| 色婷婷激情久久| 麻豆精品精品国产自在97香蕉| 欧美精品一区视频| jlzzjlzz国产精品久久| 亚洲一区二区精品久久av| 日韩网站在线看片你懂的| 国产黄色成人av| 亚洲天天做日日做天天谢日日欢| 色久优优欧美色久优优| 日本一区中文字幕| 久久精品在这里| 色视频欧美一区二区三区| 日韩国产精品久久久| 久久精品日产第一区二区三区高清版 | 91在线视频免费观看| 午夜私人影院久久久久| 久久久久99精品国产片| 在线观看视频一区二区| 极品尤物av久久免费看| 亚洲精品日韩综合观看成人91| 69堂精品视频| 成人一级视频在线观看| 亚洲国产视频直播| 国产女人aaa级久久久级| 欧美日韩精品欧美日韩精品一 | 91网站视频在线观看| 美女视频黄频大全不卡视频在线播放 | 亚洲激情图片qvod| 日韩欧美国产不卡| 色综合天天综合在线视频| 久久爱www久久做| 亚洲18女电影在线观看| 中文字幕av一区二区三区高| 日韩三级av在线播放| 欧美亚洲图片小说| www.亚洲激情.com| 国产一区二区中文字幕| 丝袜诱惑亚洲看片| 亚洲免费观看高清完整版在线| 久久久国产精品麻豆 | 欧美亚洲愉拍一区二区| 国产精品一二二区| 狠狠色2019综合网| 日本人妖一区二区| 午夜久久久久久| 一区二区不卡在线播放 | 亚洲欧美日韩成人高清在线一区| 久久综合色鬼综合色| 91麻豆精品国产91久久久久久| 91麻豆精东视频| a级高清视频欧美日韩| 国产aⅴ综合色| 国产一区二区三区四区五区入口| 青青草一区二区三区| 天堂精品中文字幕在线| 亚洲午夜久久久久久久久久久| 中文字幕色av一区二区三区| 中文久久乱码一区二区| 国产精品美日韩| 国产精品久久国产精麻豆99网站 | 亚洲三级免费电影| 中文字幕一区二区三区av| 国产亚洲美州欧州综合国| 久久久噜噜噜久噜久久综合| 久久精品亚洲国产奇米99| 久久久亚洲午夜电影| 久久久亚洲精品一区二区三区| 欧美精品一区二区三区蜜桃视频| 精品少妇一区二区三区日产乱码 | 国产欧美日韩精品在线| 久久精品日韩一区二区三区| 国产性做久久久久久| 亚洲国产精品精华液ab| 国产精品美女久久久久久| 成人免费一区二区三区视频 | 国产欧美一区二区三区网站| 国产农村妇女毛片精品久久麻豆| 中文字幕乱码久久午夜不卡| √…a在线天堂一区| 一区二区三区在线视频免费| 亚洲一级二级在线| 日韩精品欧美精品| 国产毛片一区二区| av在线综合网| 在线综合亚洲欧美在线视频| 日韩女优视频免费观看| 中文字幕欧美日本乱码一线二线| 国产精品色呦呦| 日日夜夜精品免费视频| 国产精品456露脸| 色妹子一区二区| 欧美一区二区三区啪啪| 国产偷国产偷精品高清尤物 | 蜜臀av性久久久久av蜜臀妖精| 久久精品国产精品青草| 成人高清视频免费观看| 欧美日韩一区视频| 久久久www成人免费毛片麻豆 | 中文字幕乱码一区二区免费| 亚洲综合小说图片| 韩国视频一区二区| 91麻豆福利精品推荐| 久久这里只有精品首页| 亚洲综合丁香婷婷六月香| 捆绑调教美女网站视频一区| 91在线视频播放地址| 精品成人免费观看| 亚洲综合在线观看视频| 国产乱人伦精品一区二区在线观看 | 福利一区福利二区| 欧美二区乱c少妇| 中文字幕永久在线不卡| 美女在线观看视频一区二区| 97久久超碰国产精品电影| 日韩精品中文字幕在线不卡尤物 | 欧美变态凌虐bdsm| 亚洲美女视频在线观看| 国产大片一区二区| 911精品产国品一二三产区| 一区免费观看视频| 精品一区二区三区在线观看国产| 欧美日韩一区二区在线观看 | 欧美日韩亚洲综合一区 | 久久久久久久久一| 日韩影视精彩在线| 色狠狠色噜噜噜综合网| 国产精品免费网站在线观看| 美女在线观看视频一区二区| 欧美午夜一区二区三区| 亚洲同性gay激情无套| 国产精品1区2区| 日韩精品一区二区三区中文不卡| 亚洲综合图片区| 91在线视频18| 综合久久给合久久狠狠狠97色| 国内成+人亚洲+欧美+综合在线| 欧美高清一级片在线| 偷窥国产亚洲免费视频| 欧美三日本三级三级在线播放| 一区二区久久久| 欧美影院午夜播放| 亚洲电影一级黄| 欧美日韩国产精品成人| 香蕉乱码成人久久天堂爱免费| 欧美无人高清视频在线观看| 亚洲图片欧美综合| 777a∨成人精品桃花网|