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

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

?? stm32f10x_rtc.c

?? 基于Cortex-M3的STM32的IAR EWARM的工程模塊
?? C
字號:
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name          : stm32f10x_rtc.c
* Author             : MCD Application Team
* Version            : V2.0
* Date               : 05/23/2008
* Description        : This file provides all the RTC firmware functions.
********************************************************************************
* 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 SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
* FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED 
* IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
*******************************************************************************/

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_rtc.h"

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define CRL_CNF_Set      ((u16)0x0010)      /* Configuration Flag Enable Mask */
#define CRL_CNF_Reset    ((u16)0xFFEF)      /* Configuration Flag Disable Mask */
#define RTC_LSB_Mask     ((u32)0x0000FFFF)  /* RTC LSB Mask */
#define PRLH_MSB_Mask    ((u32)0x000F0000)  /* RTC Prescaler MSB Mask */

/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

/*******************************************************************************
* Function Name  : RTC_ITConfig
* Description    : Enables or disables the specified RTC interrupts.
* Input          : - RTC_IT: specifies the RTC interrupts sources to be enabled
*                    or disabled.
*                    This parameter can be any combination of the following values:
*                       - RTC_IT_OW: Overflow interrupt
*                       - RTC_IT_ALR: Alarm interrupt
*                       - RTC_IT_SEC: Second interrupt
*                  - NewState: new state of the specified RTC interrupts.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_ITConfig(u16 RTC_IT, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_RTC_IT(RTC_IT));  
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  if (NewState != DISABLE)
  {
    RTC->CRH |= RTC_IT;
  }
  else
  {
    RTC->CRH &= (u16)~RTC_IT;
  }
}

/*******************************************************************************
* Function Name  : RTC_EnterConfigMode
* Description    : Enters the RTC configuration mode.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_EnterConfigMode(void)
{
  /* Set the CNF flag to enter in the Configuration Mode */
  RTC->CRL |= CRL_CNF_Set;
}

/*******************************************************************************
* Function Name  : RTC_ExitConfigMode
* Description    : Exits from the RTC configuration mode.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_ExitConfigMode(void)
{
  /* Reset the CNF flag to exit from the Configuration Mode */
  RTC->CRL &= CRL_CNF_Reset;
}

/*******************************************************************************
* Function Name  : RTC_GetCounter
* Description    : Gets the RTC counter value.
* Input          : None
* Output         : None
* Return         : RTC counter value.
*******************************************************************************/
u32 RTC_GetCounter(void)
{
  u16 tmp = 0;
  tmp = RTC->CNTL;

  return (((u32)RTC->CNTH << 16 ) | tmp) ;
}

/*******************************************************************************
* Function Name  : RTC_SetCounter
* Description    : Sets the RTC counter value.
* Input          : - CounterValue: RTC counter new value.
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_SetCounter(u32 CounterValue)
{ 
  RTC_EnterConfigMode();

  /* Set RTC COUNTER MSB word */
  RTC->CNTH = CounterValue >> 16;
  /* Set RTC COUNTER LSB word */
  RTC->CNTL = (CounterValue & RTC_LSB_Mask);

  RTC_ExitConfigMode();
}

/*******************************************************************************
* Function Name  : RTC_SetPrescaler
* Description    : Sets the RTC prescaler value.
* Input          : - PrescalerValue: RTC prescaler new value.
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_SetPrescaler(u32 PrescalerValue)
{
  /* Check the parameters */
  assert_param(IS_RTC_PRESCALER(PrescalerValue));
  
  RTC_EnterConfigMode();

  /* Set RTC PRESCALER MSB word */
  RTC->PRLH = (PrescalerValue & PRLH_MSB_Mask) >> 16;
  /* Set RTC PRESCALER LSB word */
  RTC->PRLL = (PrescalerValue & RTC_LSB_Mask);

  RTC_ExitConfigMode();
}

/*******************************************************************************
* Function Name  : RTC_SetAlarm
* Description    : Sets the RTC alarm value.
* Input          : - AlarmValue: RTC alarm new value.
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_SetAlarm(u32 AlarmValue)
{  
  RTC_EnterConfigMode();

  /* Set the ALARM MSB word */
  RTC->ALRH = AlarmValue >> 16;
  /* Set the ALARM LSB word */
  RTC->ALRL = (AlarmValue & RTC_LSB_Mask);

  RTC_ExitConfigMode();
}

/*******************************************************************************
* Function Name  : RTC_GetDivider
* Description    : Gets the RTC divider value.
* Input          : None
* Output         : None
* Return         : RTC Divider value.
*******************************************************************************/
u32 RTC_GetDivider(void)
{
  u32 tmp = 0x00;

  tmp = ((u32)RTC->DIVH & (u32)0x000F) << 16;
  tmp |= RTC->DIVL;

  return tmp;
}

/*******************************************************************************
* Function Name  : RTC_WaitForLastTask
* Description    : Waits until last write operation on RTC registers has finished.
*                  This function must be called before any write to RTC registers.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_WaitForLastTask(void)
{
  /* Loop until RTOFF flag is set */
  while ((RTC->CRL & RTC_FLAG_RTOFF) == (u16)RESET)
  {
  }
}

/*******************************************************************************
* Function Name  : RTC_WaitForSynchro
* Description    : Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL)
*                  are synchronized with RTC APB clock.
*                  This function must be called before any read operation after
*                  an APB reset or an APB clock stop.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_WaitForSynchro(void)
{
  /* Clear RSF flag */
  RTC->CRL &= (u16)~RTC_FLAG_RSF;

  /* Loop until RSF flag is set */
  while ((RTC->CRL & RTC_FLAG_RSF) == (u16)RESET)
  {
  }
}

/*******************************************************************************
* Function Name  : RTC_GetFlagStatus
* Description    : Checks whether the specified RTC flag is set or not.
* Input          : - RTC_FLAG: specifies the flag to check.
*                    This parameter can be one the following values:
*                       - RTC_FLAG_RTOFF: RTC Operation OFF flag
*                       - RTC_FLAG_RSF: Registers Synchronized flag
*                       - RTC_FLAG_OW: Overflow flag
*                       - RTC_FLAG_ALR: Alarm flag
*                       - RTC_FLAG_SEC: Second flag
* Output         : None
* Return         : The new state of RTC_FLAG (SET or RESET).
*******************************************************************************/
FlagStatus RTC_GetFlagStatus(u16 RTC_FLAG)
{
  FlagStatus bitstatus = RESET;
  
  /* Check the parameters */
  assert_param(IS_RTC_GET_FLAG(RTC_FLAG)); 
  
  if ((RTC->CRL & RTC_FLAG) != (u16)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}

/*******************************************************************************
* Function Name  : RTC_ClearFlag
* Description    : Clears the RTC抯 pending flags.
* Input          : - RTC_FLAG: specifies the flag to clear.
*                    This parameter can be any combination of the following values:
*                       - RTC_FLAG_RSF: Registers Synchronized flag. This flag
*                         is cleared only after an APB reset or an APB Clock stop.
*                       - RTC_FLAG_OW: Overflow flag
*                       - RTC_FLAG_ALR: Alarm flag
*                       - RTC_FLAG_SEC: Second flag
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_ClearFlag(u16 RTC_FLAG)
{
  /* Check the parameters */
  assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    
  /* Clear the coressponding RTC flag */
  RTC->CRL &= (u16)~RTC_FLAG;
}

/*******************************************************************************
* Function Name  : RTC_GetITStatus
* Description    : Checks whether the specified RTC interrupt has occured or not.
* Input          : - RTC_IT: specifies the RTC interrupts sources to check.
*                    This parameter can be one of the following values:
*                       - RTC_IT_OW: Overflow interrupt
*                       - RTC_IT_ALR: Alarm interrupt
*                       - RTC_IT_SEC: Second interrupt
* Output         : None
* Return         : The new state of the RTC_IT (SET or RESET).
*******************************************************************************/
ITStatus RTC_GetITStatus(u16 RTC_IT)
{
  ITStatus bitstatus = RESET;

  /* Check the parameters */
  assert_param(IS_RTC_GET_IT(RTC_IT)); 
  
  bitstatus = (ITStatus)(RTC->CRL & RTC_IT);

  if (((RTC->CRH & RTC_IT) != (u16)RESET) && (bitstatus != (u16)RESET))
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}

/*******************************************************************************
* Function Name  : RTC_ClearITPendingBit
* Description    : Clears the RTC抯 interrupt pending bits.
* Input          : - RTC_IT: specifies the interrupt pending bit to clear.
*                    This parameter can be any combination of the following values:
*                       - RTC_IT_OW: Overflow interrupt
*                       - RTC_IT_ALR: Alarm interrupt
*                       - RTC_IT_SEC: Second interrupt
* Output         : None
* Return         : None
*******************************************************************************/
void RTC_ClearITPendingBit(u16 RTC_IT)
{
  /* Check the parameters */
  assert_param(IS_RTC_IT(RTC_IT));  
  
  /* Clear the coressponding RTC pending bit */
  RTC->CRL &= (u16)~RTC_IT;
}

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品91自产拍在线观看一区| 欧美成人三级电影在线| 美女视频黄频大全不卡视频在线播放| 性做久久久久久免费观看| 精品电影一区二区三区 | 亚洲小少妇裸体bbw| 久久亚洲二区三区| 在线电影欧美成精品| a亚洲天堂av| 韩国理伦片一区二区三区在线播放| 亚洲精品国产一区二区三区四区在线| 精品福利在线导航| 91.xcao| 日本高清视频一区二区| 国产99久久久久| 麻豆成人久久精品二区三区小说| 一区二区三区在线不卡| 国产精品久久福利| 久久久蜜桃精品| 日韩亚洲欧美综合| 欧美乱熟臀69xxxxxx| 色综合网色综合| 成人精品电影在线观看| 欧美日本一区二区| 色8久久精品久久久久久蜜| 高清不卡一二三区| 国产精品综合久久| 国产在线一区二区综合免费视频| 天堂av在线一区| 亚洲成人在线网站| 亚洲福利视频一区| 亚洲国产精品一区二区久久| 一区二区不卡在线播放 | 26uuu精品一区二区| 欧美老肥妇做.爰bbww视频| 91国偷自产一区二区三区成为亚洲经典| 粗大黑人巨茎大战欧美成人| 国产麻豆视频精品| 精品一区二区久久久| 免费成人在线观看| 日韩精品1区2区3区| 亚洲成人黄色影院| 欧洲激情一区二区| 日本道色综合久久| 一本到高清视频免费精品| 一本一道波多野结衣一区二区| 91在线免费看| 欧洲精品视频在线观看| 欧美精品九九99久久| 欧美乱妇15p| 日韩视频在线观看一区二区| 日韩欧美123| 欧美精品一区二区三区蜜桃视频 | 亚洲丝袜制服诱惑| 亚洲精选在线视频| 亚洲高清视频在线| 奇米亚洲午夜久久精品| 九九精品视频在线看| 国产一区二区三区电影在线观看| 国产成人久久精品77777最新版本| 国产91富婆露脸刺激对白| 成人污视频在线观看| 91成人看片片| 亚洲gay无套男同| 日本aⅴ精品一区二区三区| 久久99久久99小草精品免视看| 久久 天天综合| 成人不卡免费av| 色天天综合色天天久久| 欧美精品黑人性xxxx| 久久蜜臀精品av| 亚洲精品一二三| 首页国产欧美久久| 国产精品99久久久久久似苏梦涵| 成年人网站91| 91精品国产色综合久久久蜜香臀| 亚洲精品一区在线观看| 亚洲免费高清视频在线| 另类成人小视频在线| 99久久精品免费| 日韩欧美国产一区在线观看| 国产精品视频在线看| 天堂一区二区在线免费观看| 国产精品99久久久| 欧美三级视频在线| 日本一区二区视频在线观看| 亚洲图片一区二区| 国产精品一区二区三区99| 国产精品嫩草影院com| 亚洲国产色一区| 国产91精品一区二区麻豆网站| 欧美日韩国产在线观看| 国产亲近乱来精品视频| 日韩中文字幕不卡| 97精品视频在线观看自产线路二| 日韩一区二区电影| 亚洲蜜桃精久久久久久久| 国产精品夜夜爽| 91精品欧美综合在线观看最新 | 日韩av电影天堂| 波多野结衣91| 精品国产一二三区| 天堂午夜影视日韩欧美一区二区| 97精品超碰一区二区三区| 久久久精品欧美丰满| 石原莉奈一区二区三区在线观看| 99久久99久久综合| 国产亚洲视频系列| 久久99精品久久久久久| 6080午夜不卡| 亚洲电影中文字幕在线观看| 成人激情动漫在线观看| 久久久久久综合| 色综合色狠狠天天综合色| 久久综合网色—综合色88| 日韩av成人高清| 欧美区在线观看| 一区二区三区小说| 99免费精品视频| 国产人成亚洲第一网站在线播放| 麻豆成人在线观看| 日韩一级二级三级精品视频| 亚洲成人av资源| 在线国产电影不卡| 中文字幕日韩av资源站| 成人18视频日本| 国产精品欧美一级免费| 国产一区二区h| 久久影院午夜论| 狠狠色2019综合网| 欧美电视剧免费全集观看| 日本成人超碰在线观看| 555www色欧美视频| 青草av.久久免费一区| 欧美一区二区三区免费视频| 日韩精品欧美精品| 91精品国产福利| 日本aⅴ亚洲精品中文乱码| 91精品国产一区二区三区蜜臀| 婷婷综合另类小说色区| 亚洲黄网站在线观看| 91国偷自产一区二区三区观看 | 99久久精品免费精品国产| 国产精品天美传媒| 91网站在线观看视频| 亚洲精品菠萝久久久久久久| 欧美色图第一页| 日韩专区中文字幕一区二区| 欧美一区二区在线免费播放| 久久aⅴ国产欧美74aaa| 亚洲精品一区二区三区在线观看| 韩国成人在线视频| 国产精品的网站| 色94色欧美sute亚洲13| 日韩在线一二三区| 精品国产一区a| 成人av中文字幕| 一区二区三区在线视频播放| 欧美老人xxxx18| 国产一区免费电影| 国产精品久久久99| 欧美综合一区二区| 免费久久99精品国产| 久久综合九色综合久久久精品综合| 成人在线视频一区二区| 顶级嫩模精品视频在线看| 国产精品国产a级| 欧美性猛片aaaaaaa做受| 麻豆国产欧美一区二区三区| 国产日产亚洲精品系列| 色狠狠综合天天综合综合| 日韩av电影免费观看高清完整版 | 蜜臀精品久久久久久蜜臀 | 91在线高清观看| 日韩av一区二| 国产精品丝袜久久久久久app| 在线观看91精品国产入口| 免费看日韩精品| 欧美国产一区视频在线观看| 欧美视频自拍偷拍| 韩国成人福利片在线播放| 日韩毛片视频在线看| 亚洲va天堂va国产va久| 国产亚洲一区二区在线观看| 在线亚洲一区二区| 久久精品国产网站| 亚洲美女视频在线观看| 精品久久久网站| 欧美中文字幕久久| 国产精品77777| 亚洲1区2区3区视频| 中文一区二区在线观看| 91麻豆精品91久久久久久清纯| 99久久久免费精品国产一区二区| 日本v片在线高清不卡在线观看| 最新不卡av在线| 欧美tickling网站挠脚心| 欧美三级日韩在线| 99精品视频一区二区| 国产精品一区二区免费不卡|