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

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

?? stm32f10x_pwr.c

?? STM32手持式示波器源代碼
?? C
字號:
/**
  ******************************************************************************
  * @file    stm32f10x_pwr.c
  * @author  MCD Application Team
  * @version V3.1.2
  * @date    09/28/2009
  * @brief   This file provides all the PWR firmware functions.
  ******************************************************************************
  * @copy
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
  */ 

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"

/** @addtogroup STM32F10x_StdPeriph_Driver
  * @{
  */

/** @defgroup PWR 
  * @brief PWR driver modules
  * @{
  */ 

/** @defgroup PWR_Private_TypesDefinitions
  * @{
  */

/**
  * @}
  */

/** @defgroup PWR_Private_Defines
  * @{
  */

/* --------- PWR registers bit address in the alias region ---------- */
#define PWR_OFFSET               (PWR_BASE - PERIPH_BASE)

/* --- CR Register ---*/

/* Alias word address of DBP bit */
#define CR_OFFSET                (PWR_OFFSET + 0x00)
#define DBP_BitNumber            0x08
#define CR_DBP_BB                (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))

/* Alias word address of PVDE bit */
#define PVDE_BitNumber           0x04
#define CR_PVDE_BB               (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PVDE_BitNumber * 4))

/* --- CSR Register ---*/

/* Alias word address of EWUP bit */
#define CSR_OFFSET               (PWR_OFFSET + 0x04)
#define EWUP_BitNumber           0x08
#define CSR_EWUP_BB              (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (EWUP_BitNumber * 4))

/* ------------------ PWR registers bit mask ------------------------ */

/* CR register bit mask */
#define CR_PDDS_Set              ((uint32_t)0x00000002)
#define CR_DS_Mask               ((uint32_t)0xFFFFFFFC)
#define CR_CWUF_Set              ((uint32_t)0x00000004)
#define CR_PLS_Mask              ((uint32_t)0xFFFFFF1F)

/* --------- Cortex System Control register bit mask ---------------- */

/* Cortex System Control register address */
#define SCB_SysCtrl              ((uint32_t)0xE000ED10)

/* SLEEPDEEP bit mask */
#define SysCtrl_SLEEPDEEP_Set    ((uint32_t)0x00000004)
/**
  * @}
  */

/** @defgroup PWR_Private_Macros
  * @{
  */

/**
  * @}
  */

/** @defgroup PWR_Private_Variables
  * @{
  */

/**
  * @}
  */

/** @defgroup PWR_Private_FunctionPrototypes
  * @{
  */

/**
  * @}
  */

/** @defgroup PWR_Private_Functions
  * @{
  */

/**
  * @brief  Deinitializes the PWR peripheral registers to their default reset values.
  * @param  None
  * @retval None
  */
void PWR_DeInit(void)
{
  RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, ENABLE);
  RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, DISABLE);
}

/**
  * @brief  Enables or disables access to the RTC and backup registers.
  * @param  NewState: new state of the access to the RTC and backup registers.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_BackupAccessCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState;
}

/**
  * @brief  Enables or disables the Power Voltage Detector(PVD).
  * @param  NewState: new state of the PVD.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_PVDCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  *(__IO uint32_t *) CR_PVDE_BB = (uint32_t)NewState;
}

/**
  * @brief  Configures the voltage threshold detected by the Power Voltage Detector(PVD).
  * @param  PWR_PVDLevel: specifies the PVD detection level
  *   This parameter can be one of the following values:
  *     @arg PWR_PVDLevel_2V2: PVD detection level set to 2.2V
  *     @arg PWR_PVDLevel_2V3: PVD detection level set to 2.3V
  *     @arg PWR_PVDLevel_2V4: PVD detection level set to 2.4V
  *     @arg PWR_PVDLevel_2V5: PVD detection level set to 2.5V
  *     @arg PWR_PVDLevel_2V6: PVD detection level set to 2.6V
  *     @arg PWR_PVDLevel_2V7: PVD detection level set to 2.7V
  *     @arg PWR_PVDLevel_2V8: PVD detection level set to 2.8V
  *     @arg PWR_PVDLevel_2V9: PVD detection level set to 2.9V
  * @retval None
  */
void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)
{
  uint32_t tmpreg = 0;
  /* Check the parameters */
  assert_param(IS_PWR_PVD_LEVEL(PWR_PVDLevel));
  tmpreg = PWR->CR;
  /* Clear PLS[7:5] bits */
  tmpreg &= CR_PLS_Mask;
  /* Set PLS[7:5] bits according to PWR_PVDLevel value */
  tmpreg |= PWR_PVDLevel;
  /* Store the new value */
  PWR->CR = tmpreg;
}

/**
  * @brief  Enables or disables the WakeUp Pin functionality.
  * @param  NewState: new state of the WakeUp Pin functionality.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_WakeUpPinCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  *(__IO uint32_t *) CSR_EWUP_BB = (uint32_t)NewState;
}

/**
  * @brief  Enters STOP mode.
  * @param  PWR_Regulator: specifies the regulator state in STOP mode.
  *   This parameter can be one of the following values:
  *     @arg PWR_Regulator_ON: STOP mode with regulator ON
  *     @arg PWR_Regulator_LowPower: STOP mode with regulator in low power mode
  * @param  PWR_STOPEntry: specifies if STOP mode in entered with WFI or WFE instruction.
  *   This parameter can be one of the following values:
  *     @arg PWR_STOPEntry_WFI: enter STOP mode with WFI instruction
  *     @arg PWR_STOPEntry_WFE: enter STOP mode with WFE instruction
  * @retval None
  */
void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
{
  uint32_t tmpreg = 0;
  /* Check the parameters */
  assert_param(IS_PWR_REGULATOR(PWR_Regulator));
  assert_param(IS_PWR_STOP_ENTRY(PWR_STOPEntry));
  
  /* Select the regulator state in STOP mode ---------------------------------*/
  tmpreg = PWR->CR;
  /* Clear PDDS and LPDS bits */
  tmpreg &= CR_DS_Mask;
  /* Set LPDS bit according to PWR_Regulator value */
  tmpreg |= PWR_Regulator;
  /* Store the new value */
  PWR->CR = tmpreg;
  /* Set SLEEPDEEP bit of Cortex System Control Register */
  *(__IO uint32_t *) SCB_SysCtrl |= SysCtrl_SLEEPDEEP_Set;
  
  /* Select STOP mode entry --------------------------------------------------*/
  if(PWR_STOPEntry == PWR_STOPEntry_WFI)
  {   
    /* Request Wait For Interrupt */
    __WFI();
  }
  else
  {
    /* Request Wait For Event */
    __WFE();
  }
}

/**
  * @brief  Enters STANDBY mode.
  * @param  None
  * @retval None
  */
void PWR_EnterSTANDBYMode(void)
{
  /* Clear Wake-up flag */
  PWR->CR |= CR_CWUF_Set;
  /* Select STANDBY mode */
  PWR->CR |= CR_PDDS_Set;
  /* Set SLEEPDEEP bit of Cortex System Control Register */
  *(__IO uint32_t *) SCB_SysCtrl |= SysCtrl_SLEEPDEEP_Set;
/* This option is used to ensure that store operations are completed */
#if defined ( __CC_ARM   )
  __force_stores();
#endif
  /* Request Wait For Interrupt */
  __WFI();
}

/**
  * @brief  Checks whether the specified PWR flag is set or not.
  * @param  PWR_FLAG: specifies the flag to check.
  *   This parameter can be one of the following values:
  *     @arg PWR_FLAG_WU: Wake Up flag
  *     @arg PWR_FLAG_SB: StandBy flag
  *     @arg PWR_FLAG_PVDO: PVD Output
  * @retval The new state of PWR_FLAG (SET or RESET).
  */
FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)
{
  FlagStatus bitstatus = RESET;
  /* Check the parameters */
  assert_param(IS_PWR_GET_FLAG(PWR_FLAG));
  
  if ((PWR->CSR & PWR_FLAG) != (uint32_t)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  /* Return the flag status */
  return bitstatus;
}

/**
  * @brief  Clears the PWR's pending flags.
  * @param  PWR_FLAG: specifies the flag to clear.
  *   This parameter can be one of the following values:
  *     @arg PWR_FLAG_WU: Wake Up flag
  *     @arg PWR_FLAG_SB: StandBy flag
  * @retval None
  */
void PWR_ClearFlag(uint32_t PWR_FLAG)
{
  /* Check the parameters */
  assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG));
         
  PWR->CR |=  PWR_FLAG << 2;
}

/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久一夜天堂av一区二区三区| 奇米影视在线99精品| 亚洲成年人影院| 成人深夜在线观看| 欧美一级黄色大片| 亚洲乱码中文字幕| 懂色av中文字幕一区二区三区| 69av一区二区三区| 亚洲国产成人av网| 一本大道久久精品懂色aⅴ| 精品精品国产高清一毛片一天堂| 一个色在线综合| 国产91高潮流白浆在线麻豆| 日韩色在线观看| 亚洲bt欧美bt精品| 欧美性大战久久久| 一区二区三区在线视频免费观看| 风间由美一区二区三区在线观看| 日韩欧美一二三区| 免费在线一区观看| 日韩午夜激情视频| 日韩国产精品久久久| 欧美色图免费看| 亚洲综合999| 91国产精品成人| 亚洲国产aⅴ成人精品无吗| 色悠悠久久综合| 亚洲人成网站精品片在线观看| 成人黄色网址在线观看| 国产精品乱码人人做人人爱 | 久久免费偷拍视频| 国产在线视频一区二区三区| xvideos.蜜桃一区二区| 国产一区欧美日韩| 国产精品三级电影| 91小视频免费看| 亚洲免费观看高清在线观看| 91视频一区二区| 亚洲综合久久久久| 日韩午夜三级在线| 国产精品亚洲人在线观看| 日本一区二区三区dvd视频在线| 国产成人免费xxxxxxxx| 国产精品热久久久久夜色精品三区| 成人黄色小视频在线观看| 中文字幕一区二区三区蜜月| 色婷婷综合久久久久中文一区二区| 一区二区三区中文字幕电影 | 久久综合999| 岛国av在线一区| 亚洲免费成人av| 欧美久久久一区| 激情成人综合网| 国产精品亲子乱子伦xxxx裸| 91丨九色丨蝌蚪富婆spa| 午夜电影网一区| 久久久精品免费网站| 色婷婷激情久久| 蜜乳av一区二区三区| 国产精品视频线看| 欧美久久免费观看| 成人免费看片app下载| 一区二区三区在线观看欧美| 欧美大白屁股肥臀xxxxxx| 国产曰批免费观看久久久| 一区二区三区四区在线免费观看 | 欧美伦理电影网| 国产伦精品一区二区三区免费| 国产精品免费免费| 91精品婷婷国产综合久久性色| 粉嫩av亚洲一区二区图片| 亚洲高清不卡在线| 国产欧美日韩精品在线| 欧美日韩国产bt| 成人黄页毛片网站| 久久99国产精品久久99果冻传媒| 久久久国产午夜精品 | 亚洲成av人片在www色猫咪| 2017欧美狠狠色| 欧美日韩国产另类不卡| 成人av在线资源网| 另类专区欧美蜜桃臀第一页| 亚洲欧美日韩久久| 久久婷婷色综合| 日韩精品综合一本久道在线视频| 一本色道久久加勒比精品| 国产精品亚洲人在线观看| 麻豆精品在线播放| 亚洲成人动漫精品| 夜夜揉揉日日人人青青一国产精品| 久久久久久久久久久久久夜| 3atv一区二区三区| 欧美三级资源在线| 91性感美女视频| 高清国产午夜精品久久久久久| 美女任你摸久久 | 精品精品欲导航| 欧美乱熟臀69xxxxxx| 在线观看日韩国产| 91毛片在线观看| 成人97人人超碰人人99| 国产精品香蕉一区二区三区| 久久国产福利国产秒拍| 美日韩一区二区三区| 日韩精品成人一区二区三区| 亚洲一区二区在线免费看| 日韩毛片在线免费观看| 亚洲图片激情小说| 亚洲欧美日韩综合aⅴ视频| 国产精品久久久久aaaa樱花| 国产精品亲子伦对白| 国产精品高潮呻吟| 国产精品毛片a∨一区二区三区| 欧美激情综合在线| 国产精品乱人伦中文| 亚洲日本青草视频在线怡红院| 国产精品视频一二| 亚洲欧洲综合另类| 一区二区三区欧美亚洲| 亚洲成人综合网站| 日本午夜精品一区二区三区电影| 同产精品九九九| 久久精品国产精品亚洲综合| 国产一区二区三区在线看麻豆| 国内久久精品视频| jizzjizzjizz欧美| 在线观看日韩电影| 欧美一区中文字幕| 2020国产精品自拍| 国产精品久99| 婷婷中文字幕综合| 久草中文综合在线| 成人午夜激情在线| 91传媒视频在线播放| 91麻豆精品国产91久久久| 久久久亚洲综合| 亚洲免费观看高清完整版在线观看熊| 一区二区三区高清在线| 免费国产亚洲视频| 国产宾馆实践打屁股91| 一本久久精品一区二区| 欧美一级夜夜爽| 国产精品久99| 丝袜亚洲另类欧美综合| 国产成人精品免费在线| 91免费看`日韩一区二区| 日韩一区二区视频在线观看| 国产精品人人做人人爽人人添| 亚洲成人福利片| 国产成人夜色高潮福利影视| 色婷婷av一区二区三区软件| 日韩精品一区二区在线| 成人免费在线观看入口| 老司机免费视频一区二区三区| eeuss鲁一区二区三区| 91精品国产综合久久精品app| 久久久99免费| 亚洲成a人在线观看| 成人性生交大合| 日韩一区二区电影| 亚洲色欲色欲www| 国产最新精品精品你懂的| 欧美色电影在线| 中文字幕中文在线不卡住| 久久成人免费网| 91久久精品日日躁夜夜躁欧美| 精品国产精品网麻豆系列| 依依成人精品视频| 波多野结衣亚洲| 久久久不卡影院| 精品在线视频一区| 在线不卡的av| 亚洲精品欧美激情| 波多野结衣91| 国产日韩精品视频一区| 精品在线一区二区| 欧美一区二区精美| 五月婷婷久久综合| 色猫猫国产区一区二在线视频| 久久久精品免费免费| 国内久久精品视频| 欧美tickling挠脚心丨vk| 日韩福利电影在线| 欧美日韩精品欧美日韩精品一 | 久久成人18免费观看| 欧美三日本三级三级在线播放| 亚洲丝袜美腿综合| 97久久超碰国产精品| 亚洲国产精品t66y| 国产成人在线免费观看| 久久蜜臀精品av| 国产精品77777| 国产欧美一二三区| 国产 欧美在线| 国产精品久久久久aaaa樱花 | 亚洲青青青在线视频| 91看片淫黄大片一级在线观看| 国产精品久久99| 99re在线精品| 亚洲一区影音先锋|