/**
 * @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;
}
/*******************************************************************************
* Function Name  : RTC_ClearITPendingBit
* Description    : Clears the RTC’s 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(IS_RTC_IT(RTC_IT));  
  
  /* Clear the coressponding RTC pending bit */
  RTC->CRL &= (u16)~RTC_IT;
}
示例#3
0
/**
  * @簡述  清除 RTC 的中斷待處理位.
  * @參數  RTC_IT: 待清除的 RTC 中斷待處理位.
  *                這個參數可以是下面值的任意組合:
  *                RTC_IT_OW:  溢出中斷
  *                RTC_IT_ALR: 報警中斷
  *                RTC_IT_SEC: 秒中斷
  * @返回  沒有
  */
void RTC_ClearITPendingBit(uint16_t RTC_IT)
{
  /* 檢查參數 */
  assert_param(IS_RTC_IT(RTC_IT));  
  
  /* 清除 RTC 掛起標誌 */
  RTC->CRL &= (uint16_t)~RTC_IT;
}
示例#4
0
/*******************************************************************************
* 函数名称: RTC_ClearITPendingBit
* 功能描述: 清除RTC中断挂起位.
* 输入参数: RTC_IT:将要清除的中断挂起位..
*                    这个参数可以是下面值的任意组合:
*                       - RTC_IT_OW: 溢出中断
*                       - RTC_IT_ALR: 报警中断
*                       - RTC_IT_SEC: 第二次中断
* 输出参数: 无
* 返回参数: 无
*******************************************************************************/
void RTC_ClearITPendingBit(u16 RTC_IT)
{
  /* Check the parameters [检查参数]*/
  assert_param(IS_RTC_IT(RTC_IT));  
  
  /* Clear the coressponding RTC pending bit [清除coressponding RTC挂起标志]*/
  RTC->CRL &= (u16)~RTC_IT;
}
/**
 * @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;
	}
}