mirror of https://github.com/sqfmi/Watchy.git
Fix compilation with latest version of DS3232RTC
The ALARM_2, SQWAVE_NONE and ALM2_EVERY_MINUTE definitions were moved inside DS3232RTC.pull/159/head
parent
ee57707698
commit
6e9a6a8c05
|
@ -30,7 +30,7 @@ void WatchyRTC::config(String datetime){ //String datetime format is YYYY:MM:DD:
|
|||
|
||||
void WatchyRTC::clearAlarm(){
|
||||
if(rtcType == DS3231){
|
||||
rtc_ds.alarm(ALARM_2);
|
||||
rtc_ds.alarm(DS3232RTC::ALARM_2);
|
||||
}else{
|
||||
int nextAlarmMinute = 0;
|
||||
rtc_pcf.clearAlarm(); //resets the alarm flag in the RTC
|
||||
|
@ -90,9 +90,9 @@ void WatchyRTC::_DSConfig(String datetime){ //String datetime is YYYY:MM:DD:HH:M
|
|||
rtc_ds.set(t);
|
||||
}
|
||||
//https://github.com/JChristensen/DS3232RTC
|
||||
rtc_ds.squareWave(SQWAVE_NONE); //disable square wave output
|
||||
rtc_ds.setAlarm(ALM2_EVERY_MINUTE, 0, 0, 0, 0); //alarm wakes up Watchy every minute
|
||||
rtc_ds.alarmInterrupt(ALARM_2, true); //enable alarm interrupt
|
||||
rtc_ds.squareWave(DS3232RTC::SQWAVE_NONE); //disable square wave output
|
||||
rtc_ds.setAlarm(DS3232RTC::ALM2_EVERY_MINUTE, 0, 0, 0, 0); //alarm wakes up Watchy every minute
|
||||
rtc_ds.alarmInterrupt(DS3232RTC::ALARM_2, true); //enable alarm interrupt
|
||||
}
|
||||
|
||||
void WatchyRTC::_PCFConfig(String datetime){ //String datetime is YYYY:MM:DD:HH:MM:SS
|
||||
|
|
Loading…
Reference in New Issue