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

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

?? stm32f10x_rtc.c

?? STM32的GPIO口模擬串口通信
?? C
字號:
/**
  ******************************************************************************
  * @file    stm32f10x_rtc.c
  * @author  MCD Application Team
  * @version V3.5.0
  * @date    11-March-2011
  * @brief   This file provides all the RTC 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_rtc.h"

/** @addtogroup STM32F10x_StdPeriph_Driver
  * @{
  */

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

/** @defgroup RTC_Private_TypesDefinitions
  * @{
  */ 
/**
  * @}
  */

/** @defgroup RTC_Private_Defines
  * @{
  */
#define RTC_LSB_MASK     ((uint32_t)0x0000FFFF)  /*!< RTC LSB Mask */
#define PRLH_MSB_MASK    ((uint32_t)0x000F0000)  /*!< RTC Prescaler MSB Mask */

/**
  * @}
  */

/** @defgroup RTC_Private_Macros
  * @{
  */

/**
  * @}
  */

/** @defgroup RTC_Private_Variables
  * @{
  */

/**
  * @}
  */

/** @defgroup RTC_Private_FunctionPrototypes
  * @{
  */

/**
  * @}
  */

/** @defgroup RTC_Private_Functions
  * @{
  */

/**
  * @brief  Enables or disables the specified RTC interrupts.
  * @param  RTC_IT: specifies the RTC interrupts sources to be enabled or disabled.
  *   This parameter can be any combination of the following values:
  *     @arg RTC_IT_OW: Overflow interrupt
  *     @arg RTC_IT_ALR: Alarm interrupt
  *     @arg RTC_IT_SEC: Second interrupt
  * @param  NewState: new state of the specified RTC interrupts.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void RTC_ITConfig(uint16_t 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 &= (uint16_t)~RTC_IT;
  }
}

/**
  * @brief  Enters the RTC configuration mode.
  * @param  None
  * @retval None
  */
void RTC_EnterConfigMode(void)
{
  /* Set the CNF flag to enter in the Configuration Mode */
  RTC->CRL |= RTC_CRL_CNF;
}

/**
  * @brief  Exits from the RTC configuration mode.
  * @param  None
  * @retval None
  */
void RTC_ExitConfigMode(void)
{
  /* Reset the CNF flag to exit from the Configuration Mode */
  RTC->CRL &= (uint16_t)~((uint16_t)RTC_CRL_CNF); 
}

/**
  * @brief  Gets the RTC counter value.
  * @param  None
  * @retval RTC counter value.
  */
uint32_t RTC_GetCounter(void)
{
  uint16_t tmp = 0;
  tmp = RTC->CNTL;
  return (((uint32_t)RTC->CNTH << 16 ) | tmp) ;
}

/**
  * @brief  Sets the RTC counter value.
  * @param  CounterValue: RTC counter new value.
  * @retval None
  */
void RTC_SetCounter(uint32_t 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();
}

/**
  * @brief  Sets the RTC prescaler value.
  * @param  PrescalerValue: RTC prescaler new value.
  * @retval None
  */
void RTC_SetPrescaler(uint32_t 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();
}

/**
  * @brief  Sets the RTC alarm value.
  * @param  AlarmValue: RTC alarm new value.
  * @retval None
  */
void RTC_SetAlarm(uint32_t 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();
}

/**
  * @brief  Gets the RTC divider value.
  * @param  None
  * @retval RTC Divider value.
  */
uint32_t RTC_GetDivider(void)
{
  uint32_t tmp = 0x00;
  tmp = ((uint32_t)RTC->DIVH & (uint32_t)0x000F) << 16;
  tmp |= RTC->DIVL;
  return tmp;
}

/**
  * @brief  Waits until last write operation on RTC registers has finished.
  * @note   This function must be called before any write to RTC registers.
  * @param  None
  * @retval None
  */
void RTC_WaitForLastTask(void)
{
  /* Loop until RTOFF flag is set */
  while ((RTC->CRL & RTC_FLAG_RTOFF) == (uint16_t)RESET)
  {
  }
}

/**
  * @brief  Waits until the RTC registers (RTC_CNT, RTC_ALR and RTC_PRL)
  *   are synchronized with RTC APB clock.
  * @note   This function must be called before any read operation after an APB reset
  *   or an APB clock stop.
  * @param  None
  * @retval None
  */
void RTC_WaitForSynchro(void)
{
  /* Clear RSF flag */
  RTC->CRL &= (uint16_t)~RTC_FLAG_RSF;
  /* Loop until RSF flag is set */
  while ((RTC->CRL & RTC_FLAG_RSF) == (uint16_t)RESET)
  {
  }
}

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

/**
  * @brief  Clears the RTC's pending flags.
  * @param  RTC_FLAG: specifies the flag to clear.
  *   This parameter can be any combination of the following values:
  *     @arg RTC_FLAG_RSF: Registers Synchronized flag. This flag is cleared only after
  *                        an APB reset or an APB Clock stop.
  *     @arg RTC_FLAG_OW: Overflow flag
  *     @arg RTC_FLAG_ALR: Alarm flag
  *     @arg RTC_FLAG_SEC: Second flag
  * @retval None
  */
void RTC_ClearFlag(uint16_t RTC_FLAG)
{
  /* Check the parameters */
  assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    
  /* Clear the corresponding RTC flag */
  RTC->CRL &= (uint16_t)~RTC_FLAG;
}

/**
  * @brief  Checks whether the specified RTC interrupt has occurred or not.
  * @param  RTC_IT: specifies the RTC interrupts sources to check.
  *   This parameter can be one of the following values:
  *     @arg RTC_IT_OW: Overflow interrupt
  *     @arg RTC_IT_ALR: Alarm interrupt
  *     @arg RTC_IT_SEC: Second interrupt
  * @retval The new state of the RTC_IT (SET or RESET).
  */
ITStatus RTC_GetITStatus(uint16_t 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) != (uint16_t)RESET) && (bitstatus != (uint16_t)RESET))
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}

/**
  * @brief  Clears the RTC's interrupt pending bits.
  * @param  RTC_IT: specifies the interrupt pending bit to clear.
  *   This parameter can be any combination of the following values:
  *     @arg RTC_IT_OW: Overflow interrupt
  *     @arg RTC_IT_ALR: Alarm interrupt
  *     @arg RTC_IT_SEC: Second interrupt
  * @retval None
  */
void RTC_ClearITPendingBit(uint16_t RTC_IT)
{
  /* Check the parameters */
  assert_param(IS_RTC_IT(RTC_IT));  
  
  /* Clear the corresponding RTC pending bit */
  RTC->CRL &= (uint16_t)~RTC_IT;
}

/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美综合在线观看第十页| 亚洲成av人片www| 亚洲123区在线观看| 国产精品18久久久| 欧美日韩国产免费一区二区| 中文字幕一区二区三区色视频 | 久久精品久久综合| 91麻豆精品视频| 欧美经典一区二区三区| 日韩av中文字幕一区二区三区| 成人免费的视频| 精品国产a毛片| 日韩1区2区日韩1区2区| 欧美私模裸体表演在线观看| 欧美国产激情二区三区| 国产在线播放一区| 日韩你懂的在线播放| 午夜精品免费在线| 欧美性受xxxx黑人xyx性爽| 国产精品激情偷乱一区二区∴| 日av在线不卡| 欧美一卡二卡三卡| 日日夜夜精品视频天天综合网| 91毛片在线观看| 亚洲精品伦理在线| 色综合久久久久网| 亚洲桃色在线一区| 色综合久久久网| 亚洲精品美腿丝袜| 色噜噜久久综合| 亚洲综合激情网| 欧美区在线观看| 天堂精品中文字幕在线| 欧美日韩国产高清一区| 午夜精品免费在线| 日韩精品在线看片z| 免费看黄色91| 久久久精品免费网站| 国产伦精一区二区三区| 国产欧美一区在线| 91色视频在线| 亚洲国产精品久久不卡毛片| 欧美三区免费完整视频在线观看| 亚洲午夜日本在线观看| 91精品国产综合久久久蜜臀粉嫩| 日韩1区2区日韩1区2区| 精品第一国产综合精品aⅴ| 国产伦精品一区二区三区在线观看| 国产日韩欧美一区二区三区乱码| 成人性生交大合| 一区二区三区在线观看动漫| 欧美日韩国产美| 精品一区二区三区香蕉蜜桃| 亚洲国产精品精华液ab| 色综合久久中文字幕综合网| 视频一区二区三区中文字幕| 久久综合久久综合亚洲| 成人h动漫精品一区二| 亚洲综合视频在线观看| 日韩欧美激情在线| 成人视屏免费看| 午夜伊人狠狠久久| 国产三区在线成人av| 91成人在线观看喷潮| 精品一区二区免费视频| 中文字幕欧美一区| 欧美电影一区二区| 成人毛片视频在线观看| 香蕉成人伊视频在线观看| 国产日产欧美一区二区视频| 欧美日韩午夜影院| 国产成人亚洲综合a∨猫咪| 亚洲午夜日本在线观看| 久久综合国产精品| 日本精品一区二区三区高清 | 日韩免费成人网| 91在线无精精品入口| 久久草av在线| 亚洲一区二区三区四区在线| 久久精品亚洲国产奇米99| 欧美日韩一级视频| 不卡一区在线观看| 久久精品国产精品亚洲红杏| 亚洲美女偷拍久久| 国产欧美一区二区三区沐欲| 7777精品伊人久久久大香线蕉经典版下载 | 美国毛片一区二区三区| 国产精品久久久久久久久搜平片| 欧美精品色一区二区三区| 波多野结衣视频一区| 狠狠色综合色综合网络| 午夜精品久久久久久不卡8050| 国产精品午夜在线| 精品福利二区三区| 欧美福利视频导航| 欧洲精品一区二区| av亚洲精华国产精华精| 国产盗摄视频一区二区三区| 日本欧洲一区二区| 天堂午夜影视日韩欧美一区二区| 亚洲欧洲三级电影| 国产精品久久久久婷婷二区次| 日韩欧美国产麻豆| 7777精品伊人久久久大香线蕉最新版| 在线观看欧美黄色| 91电影在线观看| 欧美视频在线一区二区三区| 日本道色综合久久| 欧美伊人久久大香线蕉综合69| 不卡的av在线| 波多野洁衣一区| 99久久免费国产| 99麻豆久久久国产精品免费| 波多野洁衣一区| 91丨porny丨首页| 色呦呦网站一区| 欧洲一区二区三区免费视频| 欧美日韩精品系列| 91精品久久久久久久91蜜桃| 884aa四虎影成人精品一区| 欧美一区二区二区| 久久午夜免费电影| 国产午夜精品一区二区三区四区| 国产亚洲婷婷免费| 国产精品你懂的| 亚洲另类色综合网站| 亚洲国产精品一区二区尤物区| 亚洲.国产.中文慕字在线| 日韩成人免费电影| 国产精品一区二区在线播放| 国产不卡在线播放| 不卡在线视频中文字幕| 欧美自拍偷拍一区| 在线电影一区二区三区| 日韩一区二区三区视频在线观看| 日韩视频免费观看高清完整版在线观看 | 白白色 亚洲乱淫| 一本到高清视频免费精品| 91豆麻精品91久久久久久| 欧美精品乱人伦久久久久久| 日韩一级片网站| 国产精品日产欧美久久久久| 亚洲欧美日韩国产综合在线| 午夜私人影院久久久久| 国产在线一区观看| 91一区二区在线观看| 777亚洲妇女| 国产精品美女久久久久久| 亚洲国产毛片aaaaa无费看| 韩国女主播成人在线观看| 97久久超碰精品国产| 欧美一区二区视频观看视频| 国产女同性恋一区二区| 亚洲电影中文字幕在线观看| 国产中文字幕一区| 91久久香蕉国产日韩欧美9色| 日韩一区二区三区av| 最新国产成人在线观看| 人人狠狠综合久久亚洲| 91一区在线观看| 亚洲精品在线电影| 亚洲国产精品影院| 不卡一区在线观看| 精品久久久久久久久久久久久久久| 国产情人综合久久777777| 亚洲五月六月丁香激情| 成人午夜碰碰视频| 精品国产乱码久久久久久1区2区| 亚洲区小说区图片区qvod| 精品一区二区三区免费播放| 在线一区二区视频| 中文字幕精品三区| 国产一区二区不卡在线| 欧美日韩在线精品一区二区三区激情 | 午夜av一区二区三区| 成人免费av在线| 久久久久久久精| 蜜臀91精品一区二区三区 | 久久一日本道色综合| 亚洲无线码一区二区三区| av中文字幕一区| 国产视频在线观看一区二区三区| 水野朝阳av一区二区三区| 色婷婷综合久久| 国产精品美女www爽爽爽| 国产精品一区二区久久精品爱涩 | 日本美女视频一区二区| 在线观看精品一区| 亚洲日本在线a| av男人天堂一区| 欧美激情艳妇裸体舞| 激情图片小说一区| 精品国产乱码久久| 精品一区二区三区av| 精品国产露脸精彩对白| 激情久久久久久久久久久久久久久久| 欧美一区二区三区在线| 日韩高清不卡一区二区三区| 91精品国产欧美一区二区18| 日韩va欧美va亚洲va久久|