请教一下,RtcAlmStruct.RtcAlarmWeek = 0x7f; 为什么就可以实现周一到周日都响?规格书中没有写这方面信息?
RtcAlmStruct.RtcAlarmSec = 0x05;
RtcAlmStruct.RtcAlarmMinute = 0x02;
RtcAlmStruct.RtcAlarmHour = 0x10;
RtcAlmStruct.RtcAlarmWeek = 0x7f; //从周一到周日,每天10:02:05启动一次闹铃
Rtc_SetAlarmTime(&RtcAlmStruct); //配置闹铃时间
Rtc_AlmIeCmd(TRUE); //使能闹钟中断
////////////////////////////////////
M0P_RTC->ALMSEC = pstcAlarmTime->RtcAlarmSec & 0x7f;
M0P_RTC->ALMMIN = pstcAlarmTime->RtcAlarmMinute & 0x7f;
M0P_RTC->ALMHOUR = pstcAlarmTime->RtcAlarmHour & 0x3f;
M0P_RTC->ALMWEEK = pstcAlarmTime->RtcAlarmWeek;
Rtc_AlmEnCmd(TRUE); //闹钟许可
规格书描写,
|