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

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

?? stm32f10x_pwr.c

?? STM32工程模板
?? C
字號:
/**
  ******************************************************************************
  * @file    stm32f10x_pwr.c
  * @author  MCD Application Team
  * @version V3.5.0
  * @date    11-March-2011
  * @brief   This file provides all the PWR firmware functions.
  ******************************************************************************
  * @attention
  *
  * 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 2011 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_DS_MASK               ((uint32_t)0xFFFFFFFC)
#define CR_PLS_MASK              ((uint32_t)0xFFFFFF1F)


/**
  * @}
  */

/** @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 */
  SCB->SCR |= SCB_SCR_SLEEPDEEP;
  
  /* Select STOP mode entry --------------------------------------------------*/
  if(PWR_STOPEntry == PWR_STOPEntry_WFI)
  {   
    /* Request Wait For Interrupt */
    __WFI();
  }
  else
  {
    /* Request Wait For Event */
    __WFE();
  }
  
  /* Reset SLEEPDEEP bit of Cortex System Control Register */
  SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP);  
}

/**
  * @brief  Enters STANDBY mode.
  * @param  None
  * @retval None
  */
void PWR_EnterSTANDBYMode(void)
{
  /* Clear Wake-up flag */
  PWR->CR |= PWR_CR_CWUF;
  /* Select STANDBY mode */
  PWR->CR |= PWR_CR_PDDS;
  /* Set SLEEPDEEP bit of Cortex System Control Register */
  SCB->SCR |= SCB_SCR_SLEEPDEEP;
/* 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 2011 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片| 中文字幕视频一区二区三区久| 成人免费av在线| 久草热8精品视频在线观看| 日韩精品每日更新| 人妖欧美一区二区| 人妖欧美一区二区| 久久99精品国产.久久久久久| 丝袜美腿成人在线| 九九久久精品视频| 国产精品一区一区| 成人午夜私人影院| 91福利精品第一导航| 欧美日韩中字一区| 日韩精品中文字幕在线不卡尤物| 精品少妇一区二区三区免费观看| 久久精品一区二区三区不卡牛牛| 2021国产精品久久精品| 久久品道一品道久久精品| 国产亚洲短视频| 自拍偷拍亚洲欧美日韩| 亚洲一区二区不卡免费| 秋霞电影网一区二区| 国产一区二区福利| 色哟哟国产精品免费观看| 欧美日韩成人激情| 精品国产99国产精品| 中文字幕精品三区| 日韩中文字幕亚洲一区二区va在线| 青青草97国产精品免费观看无弹窗版| 成人精品gif动图一区| 91免费视频网| 欧美一级在线视频| 亚洲欧美在线高清| 奇米影视一区二区三区小说| 国产精品乡下勾搭老头1| 91福利国产精品| 国产校园另类小说区| 一区二区三区免费看视频| 激情欧美一区二区| 欧美日韩一区二区在线观看 | 亚洲第一电影网| 麻豆国产精品一区二区三区| av一区二区三区在线| 日韩一区二区三区在线| 亚洲欧美日韩在线播放| 精品一区二区三区视频在线观看| 色老头久久综合| 精品第一国产综合精品aⅴ| 一区二区视频在线看| 国产米奇在线777精品观看| 欧美精品丝袜久久久中文字幕| 国产精品你懂的在线欣赏| 免费高清视频精品| 一本久道久久综合中文字幕| 久久精品欧美日韩| 看电影不卡的网站| 777亚洲妇女| 亚洲愉拍自拍另类高清精品| 风间由美性色一区二区三区| 精品成人一区二区三区四区| 天天av天天翘天天综合网| 色偷偷成人一区二区三区91| 国产精品视频第一区| 极品瑜伽女神91| 日韩欧美亚洲国产另类| 日本中文字幕一区二区视频| 欧美系列一区二区| 亚洲最色的网站| 日本电影欧美片| 亚洲另类中文字| 99久久国产综合精品色伊| 国产色一区二区| 国产成人精品免费看| www国产精品av| 国产精品自产自拍| 久久久99精品久久| 国产jizzjizz一区二区| 国产精品入口麻豆九色| 成人av午夜影院| 亚洲素人一区二区| 91福利视频在线| 亚洲电影一区二区三区| 欧美日韩一本到| 日韩电影一二三区| 精品国产一区二区三区四区四 | 国产精品久久久久久福利一牛影视| 另类人妖一区二区av| 精品福利一区二区三区| 国产盗摄女厕一区二区三区| 国产精品欧美经典| 91激情五月电影| 青娱乐精品视频| 国产亚洲综合在线| 93久久精品日日躁夜夜躁欧美| 一个色在线综合| 精品久久久久久综合日本欧美| 国内精品视频666| 国产精品国产精品国产专区不蜜| 色激情天天射综合网| 免费在线看一区| 日本一区二区三区国色天香 | 午夜欧美在线一二页| 日韩一区二区在线观看| 国产精品一级片| 中文字幕亚洲不卡| 日韩亚洲欧美在线| 处破女av一区二区| 亚洲va国产天堂va久久en| 久久视频一区二区| 在线精品视频小说1| 久久99精品国产麻豆婷婷洗澡| 日韩毛片视频在线看| 欧美一区永久视频免费观看| 国产·精品毛片| 美脚の诱脚舐め脚责91| 自拍偷拍欧美精品| 精品1区2区在线观看| 精品视频123区在线观看| 高清成人免费视频| 青娱乐精品在线视频| 亚洲欧美日韩成人高清在线一区| 日韩精品一区二区三区在线播放| 99久久婷婷国产| 国内精品久久久久影院薰衣草 | 国产精品高潮呻吟久久| 91精品视频网| 91福利区一区二区三区| 风流少妇一区二区| 精品亚洲成a人在线观看 | 日韩不卡在线观看日韩不卡视频| 国产精品二区一区二区aⅴ污介绍| 91精品视频网| 欧美老女人第四色| 欧美网站大全在线观看| 99精品欧美一区二区三区小说| 久久成人羞羞网站| 亚洲高清在线视频| 亚洲永久精品大片| 亚洲欧美激情视频在线观看一区二区三区| 日韩你懂的在线观看| 777午夜精品免费视频| 欧美午夜精品一区二区三区| 91麻豆蜜桃一区二区三区| 成人一区二区在线观看| 国产不卡视频在线播放| 国产·精品毛片| 成人永久aaa| 成人永久aaa| 99久久免费精品高清特色大片| 国产乱理伦片在线观看夜一区| 久久99精品久久久| 国内精品伊人久久久久影院对白| 美女久久久精品| 国内精品免费在线观看| 国产精品乡下勾搭老头1| 国产在线一区观看| 在线精品视频一区二区三四| 92国产精品观看| 在线精品视频一区二区| 欧美日本一区二区三区四区| 欧美日韩另类一区| 日韩视频一区二区三区| 欧美精品一区二区三区高清aⅴ| 久久一区二区视频| 中文字幕一区二区三区精华液| 亚洲欧洲日韩女同| 艳妇臀荡乳欲伦亚洲一区| 天堂在线亚洲视频| 黄页视频在线91| 99久久久精品免费观看国产蜜| 在线观看日产精品| 欧美一级黄色录像| 欧美国产日韩一二三区| 亚洲理论在线观看| 午夜精品123| 国产精品一区久久久久| 91网站最新网址| 欧美久久高跟鞋激| 国产欧美日韩激情| 樱花影视一区二区| 狠狠色狠狠色综合| 91色porny| 日韩无一区二区| 自拍av一区二区三区| 亚洲成av人影院| 国产成人自拍网| 欧美日韩aaa| 国产精品乱码一区二区三区软件| 亚洲精品国产一区二区三区四区在线| 天天射综合影视| av亚洲精华国产精华精华| 日韩一卡二卡三卡国产欧美| 欧美国产日韩在线观看| 日本一不卡视频| 91丝袜美女网| 国产亚洲成年网址在线观看| 亚洲国产精品久久艾草纯爱| 国产精品99久久久久久似苏梦涵| 欧美三级中文字|