设备通过pmu_to_standbymode进入standby mode,
按下按键,RTC都可以唤醒
但是如果在唤醒之后判断当前是何种方式唤醒的呢?
RTC_INT_FLAG_ALARM这个试了不行
/*!
\brief get RTC interrupt flag status
\param[in] flag: specify which flag status to get
only one parameter can be selected which is shown as below:
\arg RTC_INT_FLAG_SECOND: second interrupt flag
\arg RTC_INT_FLAG_ALARM: alarm interrupt flag
\arg RTC_INT_FLAG_OVERFLOW: overflow interrupt flag
\param[out] none
\retval SET or RESET
*/
FlagStatus rtc_interrupt_flag_get(uint32_t flag)
{
if(RESET != (RTC_CTL & flag)){
return SET;
}else{
return RESET;
}
}
|