/**
 * @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;
}
/*******************************************************************************
* Function Name  : RTC_ClearFlag
* Description    : Clears the RTC’s 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(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    
  /* Clear the coressponding RTC flag */
  RTC->CRL &= (u16)~RTC_FLAG;
}
Beispiel #3
0
/**
  * @簡述  清除 RTC 掛起標誌.
  * @參數  RTC_FLAG: 指定被清除的標誌.
  *                  這個參數可以是下面值的任意組合:
  *                  RTC_FLAG_RSF: 同步寄存器標誌. 只有在SPB復位或APB時鐘停止之後清除.
  *                  RTC_FLAG_OW:  溢出中斷標誌
  *                  RTC_FLAG_ALR: 報警中斷標誌
  *                  RTC_FLAG_SEC: 秒中斷標誌
  * @返回  沒有
  */
void RTC_ClearFlag(uint16_t RTC_FLAG)
{
  /* 檢查參數 */
  assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    
  /* 清除 RTC 掛起標誌 */
  RTC->CRL &= (uint16_t)~RTC_FLAG;
}
Beispiel #4
0
/*******************************************************************************
* 函数名称: RTC_ClearFlag
* 功能描述: 清除RTC挂起标志.
* 输入参数: RTC_FLAG:将被清除的标志。
*                    这个参数可以是下面值的任意组合:
*                       - RTC_FLAG_RSF: 同步寄存器标志. 只有在SPB复位或APB时钟停止之后清除..
*                       - RTC_FLAG_OW: 溢出标志
*                       - RTC_FLAG_ALR: 报警标志
*                       - RTC_FLAG_SEC: 第二次标志
* 输出参数: 无
* 返回参数: 无
*******************************************************************************/
void RTC_ClearFlag(u16 RTC_FLAG)
{
  /* Check the parameters [检查参数]*/
  assert_param(IS_RTC_CLEAR_FLAG(RTC_FLAG)); 
    
  /* Clear the coressponding RTC flag [清除coressponding RTC标志]*/
  RTC->CRL &= (u16)~RTC_FLAG;
}