mirror of
https://github.com/arduino-libraries/ArduinoLowPower.git
synced 2025-04-19 11:42:14 +03:00
Allow sleep durations of 1 day or longer
Previously, sleep durations "overflowed" at one day, resulting in a maximum sleep duration of 1 millisecond less than a day.
This commit is contained in:
parent
892594adbc
commit
fa5c24937c
@ -56,7 +56,7 @@ void ArduinoLowPowerClass::setAlarmIn(uint32_t millis) {
|
||||
|
||||
uint32_t now = rtc.getEpoch();
|
||||
rtc.setAlarmEpoch(now + millis/1000);
|
||||
rtc.enableAlarm(rtc.MATCH_HHMMSS);
|
||||
rtc.enableAlarm(rtc.MATCH_YYMMDDHHMMSS);
|
||||
}
|
||||
|
||||
void ArduinoLowPowerClass::attachInterruptWakeup(uint32_t pin, voidFuncPtr callback, uint32_t mode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user